Re: Query regarding cron jobs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi ,

Thanks Barry for your inputs ..

The script is getting executed a few times when scheduled through cron

The probability of successful execution is 6/10.

Is SELinux enabled?
SElinux is disabled in my system ..

Are you using complete paths in your script?  Your path in an interactive
shell and the one supplied by cron may be different.

 Path is  from the root dir.


> What is the difference between entries in /etc/cron.d and /etc/crontab
> file .

It is easy for a package to add/remove a file from /etc/cron.d .. a little
harder to edit /etc/crontab

How can we print the entries in /etc/cron.d  through commnad line as it not
showing any entries  crontab -l as the entry in /etc/cron.d is for root
user .

Thanks
Ankit










                                                                                                                                             
  From:       Barry Brimer <lists@xxxxxxxxxx>                                                                                                
                                                                                                                                             
  To:         General Red Hat Linux discussion list <redhat-list@xxxxxxxxxx>                                                                 
                                                                                                                                             
  Date:       09/29/2011 12:25 PM                                                                                                            
                                                                                                                                             
  Subject:    Re: Query regarding cron jobs                                                                                                  
                                                                                                                                             
  Sent by:    redhat-list-bounces@xxxxxxxxxx                                                                                                 
                                                                                                                                             





> Hi ,
>
> I have a file created in /etc/cron.d which has an entry which execute a
> command at the time interval specified .
>
> But due to some reason it is not getting executed and the entry is still
> there .

I would expect it to be there unless you removed it.  Failure to run
would not cause it to disappear.  What does the cron entry look like?

> I have checked the cron daemon is running
>
> Could you please tell the scenario in which this can happen ?

What do you see in /var/log/cron ?
What are the perms of the script / program you are calling?
Are you using complete paths in your script?  Your path in an interactive
shell and the one supplied by cron may be different.
Is SELinux enabled?
Can you run this script by hand with success?

> What is the difference between entries in /etc/cron.d and /etc/crontab
> file .

It is easy for a package to add/remove a file from /etc/cron.d .. a little
harder to edit /etc/crontab

Barry

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list


[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux