1753758 Members
4769 Online
108799 Solutions
New Discussion юеВ

Re: whats /etc/cron.d ?

 
SOLVED
Go to solution
Maaz
Valued Contributor

whats /etc/cron.d ?

Hi gurus

/etc/cron.daily, /etc/cron.weekly, and /etc/cron.monthly all are ok, I understand.

but whats the purpose of /etc/cron.d ? should I place bash script under this directory(if yes then what time/date this script will run ?), or create a file that contains job(syntax as crontab -e) ?

Regards
3 REPLIES 3
Change_happens
Honored Contributor

Re: whats /etc/cron.d ?

Yes. Its to put ur script and will run based on ur time/dates.
Alexander Chuzhoy
Honored Contributor

Re: whats /etc/cron.d ?

"Cron also searches for /etc/crontab and the files in the /etc/cron.d directory, which are in a different format (see crontab(5))."
Aashique
Honored Contributor
Solution

Re: whats /etc/cron.d ?

Hi Maaz,

In Debian and Redhat cron treats the files in /etc/cron.d as extensions to the /etc/crontab file (they follow the special format of that file, i.e. they include the user field). The intended purpose of this feature is to allow packages that require finer control of their scheduling than the /etc/cron.{daily,weekly,monthly} directories allow to add a crontab file to /etc/cron.d.

Thanks & Regards

Aashique