cancel
Showing results for 
Search instead for 
Did you mean: 

cronjob is not running

 
Highlighted
Frequent Advisor

cronjob is not running

Hi

I want to schedule cronjobs for backup scripts.I schedule it but it is not running.I have cron.deny empty.
22 REPLIES 22
Highlighted
Respected Contributor

Re: cronjob is not running

yogesh,

how r u adding script to cron here?
what is there is cron.allow file ?
you need to add user id in cron.allow first
switch to that user
set editor to vi (export EDITOR=vi)
run crontab -e
update/save and close

"There is always some scope for improvement"
Highlighted
Respected Contributor

Re: cronjob is not running

if cron.allow exists and you dont have entry in cron.allow while cron.deny is empy cron job will not run.

if cron.allow exists then you better add userid into this file using vi

also check if cron process is active

ps -ef|grep cron |grep -v grep
"There is always some scope for improvement"
Highlighted
Super Advisor

Re: cronjob is not running

hi yogesh,

if your cronn.deny is empty and cron.allow is does not exist, In this
case, all users of the system are granted cron access.so be careful of this situation.

>>.I schedule it but it is not running

try stopping the cron damaen and then start it again,

/usr/sbin/cron stop
/usr/sbin/cron start

check then by ps -ef|grep con


Highlighted
Super Advisor

Re: cronjob is not running

hi yogesh,

i am attaching a file for various options and combination for cron.allow and cron.deny. Go thru it and check your file according to that ..

Highlighted
Frequent Advisor

Re: cronjob is not running

Hi prasadb,

What u have answered the same problem i have but usr/sbin/cron start is not available.
Highlighted
Acclaimed Contributor

Re: cronjob is not running

>but /usr/sbin/cron start is not available.

As documented in cron(1M), that should be: /sbin/init.d/cron
Highlighted
Trusted Contributor

Re: cronjob is not running

check with

ps -ef | grep cron

/sbin/init.d/cron status
/sbin/init.d/cron stop
/sbin/init.d/cron start

Check for onwer of the cron job in cron.allow file

You can edit crontab

crontab -e

Thanks

SKR
Highlighted
Frequent Advisor

Re: cronjob is not running

hi
In sbin /init.d is not available.
Highlighted
Acclaimed Contributor

Re: cronjob is not running

>In sbin /init.d is not available.

What does this show:
ll /sbin/init.d/cron
ls /sbin/init.d/ | wc

This file is part of:
OS-Core.UX-CORE: /sbin/init.d/cron
PHCO_32371.UX-CORE: /sbin/init.d/cron