schedule icon indicating copy to clipboard operation
schedule copied to clipboard

How do I schedule a job that starts at minute 5 and runs every 10 minutes

Open ponders opened this issue 1 year ago • 2 comments

documentation suggests schedule.every(10).minutes.at("05:00") but schedule whines that "Invalid time format for a minutely job (valid format is :SS)". I tried changing to at(":300") (five minutes as seconds) but that also doesn't match the required format either.

ponders avatar Jun 27 '23 21:06 ponders

@ponders Did you try time.sleep for 5 mins and then schedule the job every 10 mins? What you want is to start the job after 5 mins and then it must run every 10 mins if I understood your question correctly

aquib-sh avatar Jul 05 '23 08:07 aquib-sh

@aquib-sh That completely defeats the purpose of using a scheduler.. Might aswell sleep for every 10 minutes.

@ponders I believe you could follow/combine the examples: Run a job once and Run a job every x minutes, where the first job runs in 5 minutes and schedules the actual "every-10-minute" job. Hope it helps!

mohana-martin avatar Sep 06 '23 19:09 mohana-martin