cron
“getpwnam() failed” in /bin/sh only when called from cron
It surprises me that nobody has the correct answer to this. Today i faced exactly the same problem and google didn’t help. After 2 hours i found that when placing a file in /etc/cron.d the schedule line has to contain an extra option….. I allways use this for my crontab -e # Minute Hour Day … Read more
Setting cron task every day at 2am.. makes it run every minute
This runs the script every minute of 2am (02:00, 02:01, 02:02 and so on): * 2 * * * While This runs the script at 02:13am (of each day of each month) 13 2 * * * * * * * * command to execute ┬ ┬ ┬ ┬ ┬ │ │ │ │ │ … Read more
How to set cron job for bi-weekly (twice a week)
How about the following: 0 0 * * 1,4 This sets the day of week to Monday (1) and Thursday (4). You can choose any values 0–7 (both 0 and 7 are Sunday). For a more readable crontab, you can also use names: 0 0 * * MON,THU See also: How to instruct cron to … Read more
Cron Job – How to send an output file to an email
If the script is reporting errors, they may be going to stderr, but you’re only redirecting stdout. You can redirect stderr by adding 2>&1 to the command: * * * * * /var/www/dir/sh/mysql_dump.sh 2>&1 | mail -s “mysql_dump” [email protected]
Node cron, run every midnight
You don’t need to set all the fields. Set just first three and it’ll take care of running every day at midnight 0 0 0 * * *
Running Cron Tasks on Heroku
I’m not entirely sure what you mean by “run my own cron tasks manually”. For cron specifically, you need access to crontab, which they can control, as they’re their servers. If you have another way of doing it, it would probably be fine, but bear in mind that your app is not tied to a … Read more
Cron : Setting multiple minutes
Yes, the solution you specified is correct. 0,5,55 * * * * command # run the command at the top of the hour, at # the 5 minute mark and at the 55 minute mark.
Why I’m getting unexpected EOF for my cron job?
You may need to escape the % with a \. % is a special character to the crontab, which gets translated to a newline, so your code was probably becoming -p’]T zw51′ Try: -p’]T\%zw51′
Help with basic shell script. /bin/sh: source: not found
Real sh doesn’t have source, only .. Either change the shell in cron to bash, or use . instead.