# Run a PHP script on a schedule on Windows hosting

> Run recurring jobs on HyperDC Windows hosting: create a scheduled task for a PHP script in the client area, choose how often it runs and test it with Run Now.

Difficulty: Beginner

A scheduled task runs a job for you at set times, such as sending queued mail or cleaning up old files. On Windows hosting you create tasks in the **Scheduled Tasks** tab of your service page.

## Step 1: Upload the script

Upload your script with [File Manager](/guides/windows-hosting-files-ftp), for example to `private/cron.php`. Outside `httpdocs`, visitors cannot open it.

## Step 2: Create the task

1. Open **Scheduled Tasks** and select **New Task**.
2. Enter a **Name** you will recognise.
3. Under **What it does**, choose **Run A PHP Script**.
4. In **Address or file**, enter the path relative to your hosting account, such as `private/cron.php`.
5. Choose the **PHP version** and **How often** it runs. For a daily, weekly or monthly task, write the time as `03:00`; it uses the server's time.
6. Leave **Enabled** on and select **Create Task**.

## Step 3: Test it

Select **Run Now** in the task's row, then read the **Last run** column for the time and the result.

**Verify:** the script did its job, such as writing the file or sending the message you expected.

## Troubleshooting

**The task reports an error.** Check the path in **Address or file**: it starts from your hosting account, so a script for your main domain starts with `httpdocs/`. Then run the script's page once in the browser, if it has one, to see its own message.

## Next steps

- Each site's PHP version: [add domains and choose the PHP version](/guides/windows-hosting-domains-php).

## Frequently asked questions

### How many tasks can I have?

Your plan sets the number, and Overview shows how many you have.

### Which clock do the times use?

The server's time, written as HH:mm, such as 03:00.

### Where do I put the script?

Anywhere in your hosting account. Outside httpdocs, visitors cannot open it. Upload it with File Manager.

---

Source: <https://hyperdc.com/guides/products/windows-hosting-scheduled-tasks>\
Updated: 2026-11-02
