How to Install tasks.php on Windows 11

Introduction

tasks.php is a simple and easy-to-use task scheduler for PHP which runs on top of operating system's task scheduler. This tutorial will guide you through installing tasks.php on your Windows 11 PC.

Prerequisites

Steps

  1. Download the tasks.php files from the GitHub repository: https://github.com/lgg-archive/tasks.php

  2. Extract the files to the root directory of your web server (e.g. C:\xampp\htdocs\tasks.php).

  3. Open a command prompt window in the tasks.php folder by holding the Shift key and right-clicking on the folder. Select "Open PowerShell window here".

  4. Run the following command in the command prompt to install the required dependencies using Composer:

composer install
  1. Next, you need to create a new scheduled task in Windows Task Scheduler. To do this, press Win + R on your keyboard, and type taskschd.msc to open Task Scheduler.

  2. Click the "Create Task" option from the right-hand side of the Task Scheduler window.

  3. In the "General" tab of the "Create Task" window, give your task a name and a description.

  4. In the "Triggers" tab, click "New" to create a new trigger for the task. Choose the trigger that you want to use to run the task (e.g. "On a schedule", "At log on", "On connection to user session", etc.) and configure the trigger accordingly.

  5. In the "Actions" tab, click "New" to create a new action for the task. Choose "Start a program" as the action, and then enter the path to your PHP executable (e.g. C:\xampp\php\php.exe) in the "Program/script" field.

  6. In the "Add arguments" field, enter the path to the tasks.php script file followed by the command that you want to run. For example, if you want to run a PHP file named my_script.php located in the C:\xampp\htdocs\my_tasks directory, you would enter:

"C:\xampp\htdocs\tasks.php\tasks.php" run "C:\xampp\htdocs\my_tasks\my_script.php"
  1. Click "OK" to save your new task.

  2. You can now run your task by right-clicking on it in the Task Scheduler window and selecting "Run". You can also view the task's output and status by clicking on the task and reviewing the various tabs in the Task Scheduler window.

That's it! You've successfully installed and configured tasks.php on your Windows 11 PC.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!