- Check system log at /var/log/cron to see if the job has been executed on time.
- The last cron command in file, say a file in /etc/cron.d, must be followed by an empty line. Otherwise the last cron command will not be executed.
- Add “2>&1” to the end of cron command to disable sending STD to email. By default, root receives email, or address specified by "[email protected]"
Sunday, March 25, 2018
Small Cron Job Tricks
While troubleshooting a Linux script that fails to run, learned following three tricks about cron job:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment