A2oz

How Do I Create a Scheduled Job in Windows Server?

Published in System Administration 3 mins read

You can create scheduled jobs in Windows Server using the Task Scheduler. This built-in tool allows you to automate tasks and run them at specific times or intervals.

Steps to Create a Scheduled Job:

  1. Open Task Scheduler: Search for "Task Scheduler" in the Windows search bar and open the application.
  2. Create a Basic Task: Click on "Create Basic Task" in the right pane.
  3. Name and Description: Provide a name and optional description for your task.
  4. Trigger: Choose when you want the task to run. Options include:
    • Once: Run the task at a specific time and date.
    • Daily: Run the task every day at a specified time.
    • Weekly: Run the task on specific days of the week at a specified time.
    • Monthly: Run the task on a specific day of the month at a specified time.
    • When the computer starts: Run the task when the server starts up.
    • When the computer logs on: Run the task when a user logs into the server.
  5. Action: Select the action you want the task to perform. Options include:
    • Start a program: Run an executable file.
    • Send an email: Send an email notification.
    • Display a message: Show a message on the screen.
  6. Program/Script: Specify the path to the program or script you want to run.
  7. Arguments: Provide any additional arguments or parameters required by the program.
  8. Start in: Specify the directory where the program or script is located.
  9. Summary: Review the task settings and click "Finish" to create the scheduled job.

Examples:

  • Backup a database: Schedule a task to run a backup script every night.
  • Run a system scan: Schedule a task to run a virus scan every week.
  • Send a daily report: Schedule a task to send an email with a daily performance report.
  • Update software: Schedule a task to automatically install software updates.

Practical Insights:

  • You can create multiple tasks with different triggers and actions.
  • Task Scheduler allows you to set advanced settings, such as security options and task dependencies.
  • Consider using the "Run with highest privileges" option for tasks that require administrative access.

Related Articles