views:

38

answers:

2

I have a script in cron.daily that runs at a certain time every morning. I need to change the time that it is run.

How do I change the time cron.daily runs the scripts?

A: 

If the line wasn't there, this will not solve anything.

Try finding where cron.daily is mentioned, with

grep -R cron.daily /etc

Then take it from there.

mvds
You have to be very carefully if you use these command. For example for my RedHat it returns /etc/crontab and /etc/anacrontab files. And if you remove lines with cron.daily entry you just simply turn off execution of all scripts which should be run daily (for me it is logrotate, tmpwatch, cups and so on).
Lukasz Stelmach
I didn't suggest to remove the line, the question was where to modify the cron.daily time. This is how you locate it (so this was more a "help them help themselves" kind of answer)
mvds
+2  A: 

You want to do two things:

  1. Remove the script from cron.daily and put in somewhere else.
  2. Add an entry to your crontab to run the specified script at the specified time:

00 10 * * * /path/to/script

R Samuel Klatchko