Highlighted

Cron job not working on NBU 5240 Appliance

Hi,

Can anyone help me why the task scheduler (cron job) is not working on NBU appliance? We have a script that is use to check daily backlog on our master server, running in command line it works perfectly. But adding it to the crontab, it does not work. Looking at some resources i.e., article about this but could not find one. Anyone? Appreciate any inputs on this issue.

Here is sample content of the cron

crontab -e

*/15 * * * * /usr/openv/scripts/backuplog.ksh
MAILTO=joeemailaddress.com

 

Thanks,

Joe

6 Replies
Highlighted

Re: Cron job not working on NBU 5240 Appliance

If it works via the CLI but not in cron then you're almost certainly missing a PATH entry for one of the binaries you call.

Modify your script and either add the missing directory into the PATH, or fully qualify all your binary calls.

By default the appliances' cron daemon only has the following PATH directories: /usr/bin:/bin

 

Highlighted

Re: Cron job not working on NBU 5240 Appliance


@Jose_Arevalo wrote:



*/15 * * * * /usr/openv/scripts/backuplog.ksh


Is this a typo error, or is your 1st field really  '*/15 ' ? 

Highlighted

Re: Cron job not working on NBU 5240 Appliance

*/15 is shorthand for "every 15" in cron. =)

Would be the same as writing out :

0,15,30,45 * * * * /usr/openv/scripts/backuplog.ksh

 

Highlighted

Re: Cron job not working on NBU 5240 Appliance

hello Marianne, yes it is correct, John replied with the information.

Highlighted

Re: Cron job not working on NBU 5240 Appliance

Can you try the below works for my crons 

*/15 * * * * /usr/openv/scripts/backuplog.ksh >> /dev/null

Highlighted

Re: Cron job not working on NBU 5240 Appliance

Is crond up and runing there?

ps -ef|grep cron
root 104254 1 0 Aug10 ? 00:02:48 /usr/sbin/crond -n -s -m off