Cron Job - Troobleshooting
-
Here is the Cron Job:
0 0 * * * /root/auto-backup.sh
-
@Curtis : can you show us the contents of the .sh file?
-
@Curtis said in Cron Job - Troobleshooting:
Here is the Cron Job:
0 0 * * * /root/auto-backup.sh
That's a very simple cron job, what error do you get when it runs?
-
@DustinB3403 One would think, right? No errors. Maybe there is a log somewhere?
-
@Curtis Look in the logs.
-
@DustinB3403 where?
-
@Curtis check:
tail -n 500 /var/log/cron.log or journalctl | grep CROND
-
@Curtis said in Cron Job - Troobleshooting:
@JaredBusch said in Cron Job - Troobleshooting:
Cron doesn’t run with your environment variables.
I have variables in the script, that should be fine, correct?
If they are all defined when run in an environment-less way.
-
So I just figure out that at least part of the script is running, however the rclone doesn't seem to be syncing the data to the cloud. Maybe I'll break the script into 2 parts to troubleshoot. Funny thing is when I run it manually, it works great.
-
@Curtis said in Cron Job - Troobleshooting:
So I just figure out that at least part of the script is running, however the rclone doesn't seem to be syncing the data to the cloud. Maybe I'll break the script into 2 parts to troubleshoot. Funny thing is when I run it manually, it works great.
Are you testing as root when running manually?