Windows Task Scheduler executes PHP scripts

Source: Internet
Author: User

First, the local Apache must be opened to ensure that the PHP script can be run.

To open the Task Scheduler step:

Start icon = "attachment =" system tool = "Task Scheduler

Such as:

The main interface is as follows

Click on the Task Scheduler library on the left, will be out of the currently executed task list, to modify the task, direct check, right click = "Property

Start building a new task, select the Task Scheduler library, right-click = To create a task

Go to create new task interface, top 5 Click button, General-trigger-action-condition-set

General: Give the task a name so that it can be displayed in the list of previous actions

Trigger: Click the New button to specify the trigger time, frequency, etc.

Action: Equivalent to the command you want the computer to do. Here, I want the computer to execute a batch script (. bat), which will help me open Google Chrome for a certain time and close the browser

Code:

@echo off
path=%path%; C:\Program Files (x86) \google\chrome\application\chrome.exe
Start Chrome.exe Http://localhost/index.php?r=site/Income
start/min/w Mshta vbscript:settimeout ("Window.close ()", 10000)
taskkill/f/im Chrome.exe

Save the code in Buy.bat format, new in action, check script

OK, you can go to the Task Scheduler's main interface task list to see if the task is executed

Windows Task Scheduler executes PHP scripts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.