# How to setup a cron job in Windows?

To set up a Cron job in Windows, you can use the Task Scheduler utility. Here are the steps to create and schedule a Cron job using Task Scheduler:

[info]
## 🔭 Want to get alerted when your Cron doesn’t run correctly?
Go to [Better Stack](https://betterstack.com/uptime/) and start monitoring in 5 minutes.
[/info]

## Open Task Scheduler

You can open Task Scheduler by typing "Task Scheduler" in the Start menu search bar and selecting the app from the search results.

![cron_win_1.png](https://imagedelivery.net/xZXo0QFi-1_4Zimer-T0XQ/ae5da6d2-beee-4107-0b9c-84cb59a64a00/orig =1186x1111)

## Create a new task

In the Task Scheduler window, click on the *Create Task* option in the *Actions* pane on the right.

![cron_win_2.png](https://imagedelivery.net/xZXo0QFi-1_4Zimer-T0XQ/22acfc3d-4ee2-4e0b-39cb-c31fd4dcf600/lg2x =1179x843)

## Configure the task settings

In the *Create Task* window, you can configure the following settings:

- General: Enter a name and description for the task.
- Triggers: Click on *New* to add a new trigger for the task. You can choose to run the task daily, weekly, monthly, or on a specific date and time.
- Actions: Click on *New* to add a new action for the task. Select *Start a program* as the action type, and enter the path to the program you want to run in the *Program/script* field. For example, if you want to run a Python script, enter the path to the Python interpreter followed by the path to your script. For example, **`C:\Python\python.exe C:\path\to\script.py`**.
- Conditions: Configure any additional conditions for the task, such as only running the task when the computer is idle.
- Settings: Configure any additional settings for the task, such as whether to run the task even if the user is not logged in.

![cron_win_3.png](https://imagedelivery.net/xZXo0QFi-1_4Zimer-T0XQ/132a5790-83c1-473f-cb54-aa9971469100/lg1x =1188x852)

## Save the task

Click on *OK* to save the task and close the *Create Task* window.

## Verify the task

You can verify that the task has been created by checking the *Task Scheduler Library* in the Task Scheduler window. You should see the task listed with the name and trigger you specified.

By following these steps, you can create and schedule a Cron job in Windows using the Task Scheduler utility.

[ad-uptime]