Windows 7 Running Task Scheduler on Shutdown

Jimmy59601

Extraordinary Member
Joined
Nov 22, 2014
Messages
15
I'd like to run a program only on certain days of the week, and only on shutdown on those days. If this is possible, how can ZI do this? Thanks!
 
Solution
To run a program only on certain days of the week and specifically during shutdown on those days, you can achieve this by creating a scheduled task in Windows Task Scheduler. Here's a step-by-step guide on how to set this up:

How to Schedule a Task on Specific Days of the Week and on Shutdown:​

  1. Create a Batch Script:
    • First, create a batch script that includes the command to run the program you want.
    • For example, create a runday.bat script with the command to run your program.
    []Open Task Scheduler:
    • Press Win + R, type taskschd.msc, and hit Enter. This opens the Task Scheduler.
    [
    ]Create a Basic Task:
    • Click on Create Basic Task... on...
To run a program only on certain days of the week and specifically during shutdown on those days, you can achieve this by creating a scheduled task in Windows Task Scheduler. Here's a step-by-step guide on how to set this up:

How to Schedule a Task on Specific Days of the Week and on Shutdown:​

  1. Create a Batch Script:
    • First, create a batch script that includes the command to run the program you want.
    • For example, create a runday.bat script with the command to run your program.
    []Open Task Scheduler:
    • Press Win + R, type taskschd.msc, and hit Enter. This opens the Task Scheduler.
    [
    ]Create a Basic Task:
    • Click on Create Basic Task... on the right-hand side.
    • Enter a name and description for the task, then click Next.
    []Set Trigger:
    • Choose Weekly as the trigger.
    • Select the days of the week you want the task to run.
    • Check the box for Stop the task if it runs longer than... to prevent conflicts with shutdown.
    • Click Next.
    [
    ]Set the Start Date and Time:
    • Choose a start date and time for the task.
    • Select the option Start a program and click Next.
    []Specify the Program:
    • Browse to select your batch script (runday.bat).
    • Click Next.
    [
    ]Review and Finish:
    • Review the task settings and click Finish.
  2. Customize the Task for Shutdown:
    • After creating the task, you need to modify it to ensure it runs only during shutdown.
    • Right-click on the task and select Properties.
    • Go to the Conditions tab.
    • Check the box next to Start the task only if the computer is on AC power.
    • Check the box next to Stop if the computer switches to battery power.
    • Click OK to save the settings.

      Testing:​

    • You can test the task by shutting down your computer on the scheduled days to see if the program runs during shutdown as intended. By following these steps, you can set up a scheduled task to run your program only on specific days of the week and specifically during shutdown on those days. If you encounter any issues or need further assistance, feel free to ask!
 
Solution