Reputation: 55
I had scheduled a python script using windows task schedule in daily basis. but due to network and some other technical issue my excel file in python script willn't able to update during schedule time due to this i need to manually run the python script, let me know any option is avl to run the task scheduler once the file is updated.
for Example: My scheduled time to run the python script is 9 AM on every day,but my consent is if the excel file is not updated on python at 9 AM task Scheduler needs to run at 9.30 & 10 AM by the next day it needs to run 9AM itself.
Thanks in advance.
Upvotes: 1
Views: 519
Reputation: 609
Here is a very similar problem to yours:
Retry attempts on failure when installing scheduled task with PowerShell
The command in your case is something like:
$Settings = New-ScheduledTaskSettingsSet -RestartCount:1 -RestartInterval (New-TimeSpan -Minutes 30)
Upvotes: 1