Jump to content

Cron again....

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
Hektor

Hektor

    Programmer

  • Members
  • PipPipPipPip
  • 126 posts
I made some crontab jobs that look like this:


10 2 * * *      /script

10 3 * * Mon  /script

10 4 * 1 *      /script


Which says run the script every day at 2:10.
Every Monday at 3:10.
And on the first of the month at 4:10.

It doesn't work (and it turned out to be a script error) but I found these directories:


# /etc/cron.daily/

# /etc/cron.weekly/

# /etc/cron.monthly/ 


And the daily/weekly had scripts in them. I assume you place a script in these directories and it executes at the respected time (daily/weekly/month). Is this true? If so, why are they there instead of using the crontab? Which is better for me to use running scripts as root?

#2
Tor

Tor

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 486 posts
I think that those directories do the same as your crontab that you have setup... but.. I think there is suppose to be a crontab script that executes daily which goes through those directories and executes every script. I don't know for sure though cause I never used it.