linux - crontab not working properly -
when run script manually using root working fine. when execute same script within cron not running. checked cron calling script script not executing. exported output of echos in script text file text file didn't logged anything. please check cron
*/10 * * * * sh /var/www/sym_monitor/restart.sh > /var/www/migrate/root_restart.txt
another approach avoid typing total executable paths set shell global variables @ top of crontab :
shell=/bin/sh path=/bin:/usr/bin:/usr/local/bin mail=me@domain.tld */10 * * * * stuff > log 2>&1 note > log 2>&1 syntax log both stderr & stdout in log file
linux shell ubuntu crontab
No comments:
Post a Comment