- 論壇徽章:
- 0
|
一個crontab的問題,思考一個周也沒解決。
what system you have ?
got '/var/cron/log' ?
to troubleshooting cron , try to use script debug ( get detailed execution steps ) and output redirect (other than check mail, arbitrarily redirect the runtime output to a log file ) .
say a sample debugging crontab :
* * * * * sh -x /dir1/dir2/yourscript 2>&1 >/tmp/yourscript.log
explain :
sh -x /dir/dir2/yourscript2 turn debug mode on in runtime
2>&1 put standard error and standard output together
>/tmp/yourscript.log and write to a log file .
hopefully this time you got something from /tmp/yourscript.log . |
|