Cron file help

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Cron file help

Post by BDKR »

It's been a while and just a little forgetful. 8O Anyway, here is what I want.

30 23 * * 1,3,5,6 /run/some/script.

What do you see happening here? I know what I want it to do, but just curious if I'm correct. It should be running the script at 2330 on Monday, Wednesday, Friday, and Saturday.

Cheers,
BDKR
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post by protokol »

In a *nix console:

# man 5 crontab
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

Forgot about that one. I did a regular man crontab.

On the other hand, you could've just answered the question as it's obvious from what I wrote that I have an idea. :roll:

Thanx
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post by protokol »

But that would be WAAAAAAAY to easy ;-)
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

usually my crontab starts like this (saves some time looking it up

Code: Select all

#
# man 5 crontab
#
# *     *   *   *    *  command to be executed
# -     -    -    -    -
# |     |     |     |     |
# |     |     |     |     +----- day of week (1 - 7) (monday = 1)
# |     |     |     +------- month (1 - 12)
# |     |     +--------- day of month (1 - 31)
# |     +----------- hour (0 - 23)
# +------------- min (0 - 59)
#
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

timvw wrote:usually my crontab starts like this (saves some time looking it up

Code: Select all

#
# man 5 crontab
#
# *     *   *   *    *  command to be executed
# -     -    -    -    -
# |     |     |     |     |
# |     |     |     |     +----- day of week (1 - 7) (monday = 1)
# |     |     |     +------- month (1 - 12)
# |     |     +--------- day of month (1 - 31)
# |     +----------- hour (0 - 23)
# +------------- min (0 - 59)
#
What I want to say is "Brilliant!", but it still doesn't account for lists or ranges. That's what my specific question was relating too, eventhough I did a horrible job of getting that across.

But evenstill, it's an awesome idea!

Thanx to both of you.
Post Reply