Phiwi Moyo
asked on
How do I schedule a powershell script?
I have this simple script to stop and start an application at 12:00 AM daily.
I want to schedule it, but it will not run all the commands on my script.
It kills the application, but never starts it again.
I am open to a different route in order to achieve this, even if it's via dos or vbscript.
Thank you.
I want to schedule it, but it will not run all the commands on my script.
It kills the application, but never starts it again.
taskkill /F /IM A5ApplicationServer.exe;
Start-Sleep -s 10;
Start-Process C:\"Program Files\a5V11 ApplicationServer"\A5ApplicationServer.exe;
I am open to a different route in order to achieve this, even if it's via dos or vbscript.
Thank you.
I use AutoIt to script just about everything.
https://www.autoitscript.com/site/autoit/
Free and awesome.
https://www.autoitscript.com/site/autoit/
Free and awesome.
Have you tried to increase de Start-Sleep parameter? Maybe to 30 seconds or so?
And I'm assuming that you are using Windows Schedule Task for schedule the script.
And I'm assuming that you are using Windows Schedule Task for schedule the script.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Solved it myself.
Also, have them set in task scheduler. Just my 2 pence