Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Different minutes of hour in one crontab entry

by chinmaykmawar (Initiate)
on Dec 08, 2014 at 09:49 UTC ( [id://1109536]=perlquestion: print w/replies, xml ) Need Help??

chinmaykmawar has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I have a script that has to run at 3:00AM and 6:30AM

Currently i have two different cron entries for each of these. I know how one one entry would be required if it was 3:30 and 6:30.

But is it possible to have one cron entry to run at 3:00 and 6:30?

Replies are listed 'Best First'.
Re: Different minutes of hour in one crontab entry
by blindluke (Hermit) on Dec 08, 2014 at 09:59 UTC

    Is the script written in Perl? Is the question related to Perl in any way?

    Update: To the point of your question though, even if there was some elaborate syntax (I don't think there is) that would allow you to define such an entry, why would you want to have one very complicated line in your crontab instead of two lines that are perfectly readable? Crontab readability is a much better target than its size.

    - Luke

Re: Different minutes of hour in one crontab entry
by jonadab (Parson) on Dec 08, 2014 at 11:44 UTC

    I don't think this is possible with a traditional Unix cron. It is possible there may be some version of some cron substitute software out there somewhere that has some kind of crontab-format extension to support this, but if so I am not aware of it.

    My advice would be to just put the two lines right next to each other in the crontab file, with a single comment above them for both. Your crontab should be structured this way -- groups of related lines separated by whitespace -- in any case, for readability.

Re: Different minutes of hour in one crontab entry
by marto (Cardinal) on Dec 08, 2014 at 09:56 UTC

    How does this relate to Perl specifically?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1109536]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-03-28 14:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found