Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Run if weekend

by QuillMeantTen (Friar)
on Jun 14, 2016 at 15:53 UTC ( #1165611=note: print w/replies, xml ) Need Help??


in reply to Run if weekend

  1. Update, I was wrong, 0 is sunday, source: perldoc
  2. Else if you run it on an unix system you can always use a cronjob it might be easier from an administration point of view
  3. Added the usual disclaimer at end of post


Funny you should ask that, for a script at work I just started using Date::Calc for manipulating weekdays, if you just want that datum and nothing else you can get it using this:
my $wday = (localtime)[6]; if($wday == 0 || $wday == 6){ #do something }
Be aware that its only my kind of fishing here, keep looking for answers and explanations.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2022-05-24 19:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (84 votes). Check out past polls.

    Notices?