Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Continuous or timed?

by hippo (Bishop)
on Dec 11, 2020 at 16:24 UTC ( [id://11125009]=note: print w/replies, xml ) Need Help??


in reply to Continuous or timed?

For this particular requirement I would go with 2 every time. As you say, it doesn't need to be minute-accurate and moreover you know the windows for each operation so it doesn't even need to fire up every 5 mins (eg. not between 23:00 and 05:00 and not between 09:00 and 15:00 (lat/long/TZ depending).

The other option like 3 is not to use cron but to use at instead. The script can calculate the time of next op and submit itself as an at job for that time. I have used Schedule::At for precisely this in the past.


🦛

Replies are listed 'Best First'.
Re^2: Continuous or timed?
by Bod (Parson) on Dec 11, 2020 at 16:32 UTC

    Thank you hippo

    I have used Schedule::At for precisely this in the past

    I didn't think about at because I mostly use a Windows environment and at has been deprecated in Windows 10 in favour of the more involved schtasks. But, of course, with the Raspberry Pi I am in a Linux environment which I have never used in any significant depth and not at all recently. Schedule::At looks very useful :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-24 11:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found