How can I setup a schedule for exact minute of every hour?
See original GitHub issueI have setup a raspberry pi for read temperature and humidity from sensor and I would like it to publish those data to a MQTT broker at 00,15,30,45 minute of every hour, like weather report of observatory . How can I setup this schedule?
I have setup a schedule like this: schedule.every(15).minutes.do(read_n_publish)
but it can only run the job every 15 minute from the time I start run the program.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Cron job every hour at 30 minutes - Crontab.guru
The quick and simple editor for cron schedule expressions by Cronitor. “At minute 30 ... Cron job every hour at 30 minutes is...
Read more >Need to schedule a job every hour in jenkins - Super User
Jenkins use cron expression as explained here. To schedule every hour, then you can put 0 * * * *. Then your job...
Read more >How to Schedule a Python Code to Run Every Hour, Day ...
This video explains how to schedule a Python script to run every week, day, hour, minute or secondYou first import the schedule and...
Read more >Controlling start time intervals in Scheduling
In Scheduling, click Availability. Click Global scheduling limits, then click Start time intervals. Select Automatically based on your ...
Read more >How to schedule task for start of every hour - Stack Overflow
This is helpful but note that this code will run the task 1 minute and 1 second later than the beginning of an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mickey9801 This is really simple.
The whole schedule package implementation is sequential. And, you could solve the problem like this. `schedule.every(15).minutes.do(read_n_publish) schedule.every(30).minutes.do(read_n_publish) schedule.every(45).minutes.do(read_n_publish)
while True: schedule.run_pending() time.sleep(1)`
What this will do is it will run the code every 15, 30, 45 minutes.
Exactly, so the @fauzanbaigm solution wouldn’t work correctly, i.e. it wouldn’t run at exactly e.g. 12:30, but it would run at e.g. 12:38.
I need this functionality as well.