0

I would like to be able to run a task on the 3rd and 8th minute in the day between 7am-4pm local time. Also, it should only run Monday-Friday. I am writing this task in python and I am not sure what the best method of achieving this would be.

I do not have access to cron (it will run on windows), and I have looked at multiple schedulers including apscheduler but unless I missed something I have not seen a way to achieve this.

I read this post where they talk about apscheduler, in reading that, and in the documentation, I only see a way to schedule the task in intervals or for a future time, but not on an exact time of the day.

Any advice is appreciated. Thank you for your time.

Example of times to run

7:03-Run
7:08-Run
7:13-Run
7:18-Run
7:23-Run
7:28-Run
.
.
.
etc
laxer
  • 720
  • 11
  • 41

2 Answers2

1

Looks like you could use apscheduler cron trigger type, with schedule like this 3,8,13,18,23,28,3 7-16 * * 1-5

yibo
  • 517
  • 3
  • 10
0

The Windows equivalent of cron is Scheduled Tasks. See this post for an example of its usage.

koko
  • 158
  • 1
  • 7