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

Re: Fwd: Inquiry: How to set the crontab job permanently



Dear Osamu
Please find below our /etc/cron* directories :
"
[root@omc-1 root]# ls -la /etc/cron*
-rw-r--r--    1 root     root          255 Jul 25 09:41 /etc/crontab
/etc/cron.d:
total 12
drwxr-xr-x    2 root     root         4096 Sep  2  2004 .
drwxr-xr-x   34 root     root         4096 Jul 26 10:06 ..
-rwxr-xr-x    1 root     root           94 Aug 13  2001 sysstat
/etc/cron.daily:
total 36
drwxr-xr-x    2 root     root         4096 Sep  2  2004 .
drwxr-xr-x   34 root     root         4096 Jul 26 10:06 ..
lrwxrwxrwx    1 root     root           28 Sep  2  2004 00-logwatch -> ../log.d/scripts/logwatch.pl
-rwxr-xr-x    1 root     root          276 Jun 25  2001 0anacron
-rwxr-xr-x    1 root     root           51 Sep  4  2001 logrotate
-rwxr-xr-x    1 root     root          402 Aug 31  2001 makewhatis.cron
-rwxr-xr-x    1 root     root          104 Sep  6  2001 rpm
-rwxr-xr-x    1 root     root          132 Jun 25  2001 slocate.cron
-rwxr-xr-x    1 root     root           91 Aug 13  2001 sysstat
-rwxr-xr-x    1 root     root          193 Aug 29  2001 tmpwatch
/etc/cron.hourly:
total 8
drwxr-xr-x    2 root     root         4096 Jul 19  2001 .
drwxr-xr-x   34 root     root         4096 Jul 26 10:06 ..
/etc/cron.monthly:
total 12
drwxr-xr-x    2 root     root         4096 Sep  2  2004 .
drwxr-xr-x   34 root     root         4096 Jul 26 10:06 ..
-rwxr-xr-x    1 root     root          278 Jun 25  2001 0anacron
/etc/cron.weekly:
total 16
drwxr-xr-x    2 root     root         4096 Sep  2  2004 .
drwxr-xr-x   34 root     root         4096 Jul 26 10:06 ..
-rwxr-xr-x    1 root     root          277 Jun 25  2001 0anacron
-rwxr-xr-x    1 root     root          399 Aug 31  2001 makewhatis.cron
[root@omc-1 root]#
"
We want our new scheduled task to be done at 23:30 every day . Can you please let us know how and where we need to add our new lines ?
Regards
H.Motamedi
 


 
On Sun, Jul 26, 2009 at 7:44 AM, Osamu Aoki <osamu@debian.org> wrote:
On Sun, Jul 26, 2009 at 06:37:04AM +0100, hadi motamedi wrote:
> As you see , the crontab job is functioning correctly but if we try to
> reboot the server we will loose the last entry listed from the "crontab -l"
> as above , as we have added it through issuing "crontab -e" . Can you please
> let us know how we can make it as permanent even after reboot ?
> Regards
> H.Motamedi

Put scripts in one of /etc/cron.*/ directories.  It is run under root.

Osamu


Reply to: