简体   繁体   中英

How to schedule a task to run only at a specific time?

  1. I'm using Windows 10 Task Scheduler to run my python script daily and it runs fine. But I want that script to run only on weekdays Start time: 8.15 AM and End time: 4.15 PM. So here I have configured https://imgur.com/GYuQNdl But it runs for every 8hrs, ie, 8.15, 4.15, 12.15 but I want to run it only once a day at a specific time Start time: 8.15 AM and End time: 4.15 PM. So how can I achieve that?

  2. One more thing, If I achieve a solution for the 1st ques next thing is, I don't want to run the script on public holidays or when I'm on leave. So I think that I should sync it with my calendar. First of all, I wanna know is it possible to run the script in that way is there any option for that?

  1. You should not schedule the task to run every 8 hours if you want it to run only once a day. You should only care about the start time but not the end time.

  2. Depends on you want to read your outlook using COM or you want to tap into Exchange server to read your calendar, you can try this to check your calendar in your script.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM