How do you schedule a task in Windows XP to run when you shutdown windows. Such that I want to run a simple command line program I wrote in c# everytime I shut down windows. There doesn't seem to be an option in scheduled tasks to perform this task when my computer shuts down.
Open Start, Search for Task Scheduler, and press enter to open Task Scheduler. Click on the "Create Basic Task" option. Provide the Task Name such as Shutdown and click next. Choose when would you like your task to start and click next.
No, it won't execute.
To create a shutdown timer manually, open Command Prompt and type the command shutdown -s -t XXXX. The "XXXX" should be the time in seconds you want to elapse before the computer shuts down. For instance, if you want the computer to shut down in 2 hours, the command should look like shutdown -s -t 7200.
To do this, go to your local group policy editor (Click Start, type gpedit. msc in the Start Search box, and then press ENTER.) Within here, you can choose to select scripts which will run on your machine as part of startup/shutdown.
Execute gpedit.msc (local Policies)
Computer Configuration -> Windows settings -> Scripts -> Shutdown -> Properties -> Add
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With