I'm having trouble with a cron job that should run daily at 8:30 PM to back up my files. The job is set up like this: `30 20 * * * /home/[username]/projects/sevendayfinalbu.sh >> /home/[username]/cron_logs/sevenday.log 2>&1`. I've verified that the path is correct and it runs perfectly from the terminal. However, no logs are being produced when the cron job is supposed to run, and I'm using a Chromebook. I'd appreciate any insights on this issue!
2 Answers
The most likely issue is that while cron is indeed attempting to run your script, it's running in an environment that doesn't match what you'd expect when running it manually. There might be specific environmental variables or configurations in your script that aren't available when run via cron.
First off, try breaking it down into smaller steps. Set a simple cron job like `echo "Hello, world!"` five minutes from now to see if cron is even triggering jobs. Then you can progress to checking if outputs are being logged. If those work, there might be a permission issue or something in your script that's not compatible with cron.
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures