Setting Up A Crontab
Hey folks! I was wondering if anyone could help me out with crontabs....it was explained to one once, but I totally forget how it's done.
What I want to do is run a script every hour, on the hour, but I'm not sure what sequence of numbers I should use in the crontab entry....any help would be gratefully appreciated
omni posted this at 19:00 — 17th October 2000.
They have: 32 posts
Joined: Oct 2000
Create a file with the following in it:
0 * * * * /path/to/command
...save the file then type:
crontab /path/to/file/u/just/created
And you're set. Here's what the 0 and the following 4 stars represent.
field allowed values
----- --------------
minute 0-59
hour 0-23
day of month 1-31
month 1-12 (or names, see below)
day of week 0-7 (0 or 7 is Sun, or use names)
The above file I told you create will run the script every 0 minute of every hour, every day of the month, every month, every day of the week. Hence every hour on the hour it will run.
Greg
Need help? Ask an expert.
infoDNS - Domain Name Registration and Information Services
infoForums - Domain Name Registration Forums and Information Services
sordid posted this at 21:07 — 17th October 2000.
They have: 13 posts
Joined: May 1999
Thanks Man!!!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.