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