Cron não executa script
Responder tópico2. Re: Cron não executa script
Enviado em 02/11/2022 - 14:44h
Salve!
Brother, faz o seguinte, cria um arquivo dentro de: "/etc/cron.d/qualquer_nome"
Dentro dele vc vai colocar os scripts que queres rodar, por exemplo:
04 2 * * * root /usr/local/sbin/roda_backup_tal.sh
04 */2 * * * root /usr/local/sbin/faz_dump_do_db.sh
04 6 * * * root /usr/local/sbin/compacta_todos_logs.sh
04 9 * * * root /usr/local/sbin/executa_terminal.sh
Blz?
Se tiver com duvidas, segue abaixo dois posts interessantes para estudo:
https://www.vivaolinux.com.br/artigo/Como-programar-backup-com-rsync-e-cron-de-maneira-rapida-e-simp...
https://e-tinet.com/linux/crontab/#:~:text=Op%C3%A7%C3%B5es%20de%20configura%C3%A7%C3%A3o%20do%20Cro....
3. Re: Cron não executa script
Enviado em 02/11/2022 - 15:05h
Obrigado irmão. Vou realizar o procedimento e retorno com o resultado.
4. Re: Cron não executa script
Enviado em 11/11/2022 - 05:44h
finally i found a solution ... instead of entering the cronjob with
crontab -e
i needed to edit the crontab file directly
https://www.dinarrecaps.onl/
nano /etc/crontab
adding e.g. something like
*/5 * * * * root /bin/bash /var/scripts/vpn-check.sh
and its fine now!
Thank you all for your help ... hope my solution will help other people as well.
crontab -e
i needed to edit the crontab file directly
https://www.dinarrecaps.onl/
nano /etc/crontab
adding e.g. something like
*/5 * * * * root /bin/bash /var/scripts/vpn-check.sh
and its fine now!
Thank you all for your help ... hope my solution will help other people as well.
Responder tópico
Entre na sua conta para responder.