How to configure the crontab with chmod privilege?

559 views Asked by At

I don't know why my ubuntu server crontab job not happening by the system. Here is my cron configuration.

45 6 * * * /usr/bin/sh /var/www/html/vtigercrm/cron/vtigercron.sh

Just now I ran into the log and i have seen these lines..

Dec 27 06:45:01 Surya CRON[31908]: (root) CMD (/usr/bin/sh /var/www/html/vtigercrm/cron/vtigercron.sh)

There is no error message whether its success or not, But job hasn't done that part.

Can any tell me am I did anything wrong?

When i run manually with root privilege it is running without any errors. Where as by the Vtiger its not.

Thanks & Regards,

2

There are 2 answers

0
Kotler On

I think you can run cron with command:

45 6 * * * /bin/bash /var/www/html/vtigercrm/cron/vtigercron.sh

Because maybe something with /usr/bin/sh. So you can run with /bin/bash

1
dim dominiq On

I have this config, work fine for me :

*/15 * * * * www-data /usr/bin/flock -n /tmp/vtigercron.lock -c /var/www/vtigercrm/cron/vtigercron.sh