AR300M CronJob Failing

I cannot get a cronjob to run in my AR300M. It appears Cron is enabled and started at boot, so no need to start it manually.

I have a test script in the root directory ( which runs fine if I execute manually (it simply sends an entry to the log “script working”). However, I cannot get it to work using cron. I went into Luci>System>Scheduled Tasks and added this:

*/1 * * * * /root/script

Also tried several variations “/1", "/1 /script” etc. but no luck. Every minute I get something like this in the log:

USER root pid 16876 cmd /root/script

Also, after booting I get a time synch error (which might be part of the problem):
“cron.err crond[1579]: time disparity of 126 minutes detected”

Any ideas?




OK, done further testing - it seems that “/root” is different from “/” (obvious now I think about it!).

Also, tried putting the script in another directory (/etc/crontabs) and managed to get the cronjob to run!

This was the final cronjob that worked:

*/1 * * * * /full/path/to/script/

So, in summary, it seems it was a combination of bad directory and bad scripting. I will report back if I find any further problems.




thanks for sharing.