please help with cron

please help with cron

Post by neal » Wed, 12 Jun 2002 07:58:22



I need to have cron change the date on a test server. Just for testing
I tried the following: which I expected to change the date every 5
min.

I used vi to edit the /etc/crontab file as I was told to put it here
to  make it permanent and reload upon booting.

 # cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

###### Here is what I have tried######

5 * * * * root /bin/date -s 2002-04-16

*5 * * * * root /bin/date -s 2002-04-16

I wanted to have the cron daemon, every 5 minutes to reset the date on
the server to apr-16-2002. After I edit the /etc/crontab file I do
load it via Crontab /etc/crontab.... then check it via crontab -l

#crontab -l

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

5 * * * * root /bin/date -s 2002-04-16

*5 * * * * root /bin/date -s 2002-04-16

I still cannot get it to work. The above is just a test but my goal is

Any help would be appreciated. I have verified the daemon is running

Ps -aucx | more shows it running

root       697  0.0  0.3  1652  760 ?        S     2001   0:00 crond

 
 
 

please help with cron

Post by fatwreckfa » Wed, 12 Jun 2002 10:24:43


Try "crontab -e".

man crontab would help too I'd think.


> I need to have cron change the date on a test server. Just for testing
> I tried the following: which I expected to change the date every 5
> min.

> I used vi to edit the /etc/crontab file as I was told to put it here
> to  make it permanent and reload upon booting.

>  # cat /etc/crontab
> SHELL=/bin/bash
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> MAILTO=root
> HOME=/

> # run-parts
> 01 * * * * root run-parts /etc/cron.hourly
> 02 4 * * * root run-parts /etc/cron.daily
> 22 4 * * 0 root run-parts /etc/cron.weekly
> 42 4 1 * * root run-parts /etc/cron.monthly

> ###### Here is what I have tried######

> 5 * * * * root /bin/date -s 2002-04-16

> *5 * * * * root /bin/date -s 2002-04-16

> I wanted to have the cron daemon, every 5 minutes to reset the date on
> the server to apr-16-2002. After I edit the /etc/crontab file I do
> load it via Crontab /etc/crontab.... then check it via crontab -l

> #crontab -l

> # run-parts
> 01 * * * * root run-parts /etc/cron.hourly
> 02 4 * * * root run-parts /etc/cron.daily
> 22 4 * * 0 root run-parts /etc/cron.weekly
> 42 4 1 * * root run-parts /etc/cron.monthly

> 5 * * * * root /bin/date -s 2002-04-16

> *5 * * * * root /bin/date -s 2002-04-16

> I still cannot get it to work. The above is just a test but my goal is

> Any help would be appreciated. I have verified the daemon is running

> Ps -aucx | more shows it running

> root       697  0.0  0.3  1652  760 ?        S     2001   0:00 crond


 
 
 

1. cron.deny and cron.allow files for CRON management

Hi All

I  can not  seem to be able to  make these files  work. Despite  an
entry  in  cron.deny  file,  the  specific user  can use
the crontab  command  to  submit  a  job  to  cron and  the  job
does  gets  executed.
Crontab  command  is  supposed  to check  entries  in these  files.
Ido not think  this is  happening.

Any  idea  will  be  greatly  appreciated.
Please  send  me an e-mail.

Thanks


2. Creation of "Common Ground" Document

3. PLEASE PLEASE HELP Major problem with my SCSI & Redhat 5.0 PLEASE Help

4. Signals - Events

5. Sendmail problems. Please please please please help!

6. ati aiw 128 16Mo

7. NFS please help me please please please sniff

8. ftp client programming problem..

9. Cron script needed to make backups - help please

10. error by doing a cron job...command not found...please help!!!

11. PLEASE HELP: unable to view cron

12. CRON has the wrong time - help please

13. A problem with cron, please help