7 ms·
And the subtle differences between a cronjob’s shell environment and your command prompt’s shell environment can be maddening. This is my favorite thing to com
by orblivion 16y ago
And the subtle differences between a cronjob’s shell environment and your command prompt’s shell environment can be maddening.
This is my favorite thing to complain about with cron. I can't believe that there's still not a way to test run cron entries. So far I just add > tmp.out >> tmp.err, set it to run every minute, and wait.
- JoachimSchipper 16y agoYou should set some variables (SHELL, PATH, HOME) in your crontab. Just run "sudo env -i SHELL=... PATH=... HOME=... cmd"; this should work if cron would work.
- Pistos2 16y agohttp://serverfault.com/questions/85893/running-a-cron-job-manually-and-immediately http://serverfault.com/questions/85893/running-a-cron-job-ma... I completely agree that there should be a better, direct way to test cron jobs.
- pmccool 16y agoI used to do this by exec()ing a shell with no environment. 'Twasn't perfect, but it caught a lot of irritating little errors.