## How to run php file in task scheduler ?

General discussions related to php

Moderators: macek, egami, gesf

mayathidup
New php-forum User
Posts: 1
Joined: Tue Sep 24, 2013 5:43 pm

### How to run php file in task scheduler ?

I develop a system using WampServer.

I try run the script using Task Scheduler. The program run successfully, but there is no output after all. Supposedly, an email is automatically send to me if there is no problem occur.

At the Program/Script under "Action Tab", I put .bat file that consist of this line :

Code: Select all

C:\wamp\bin\php\php5.3.13\php-win.exe -f "C:\wamp\www\assetmanagementsystem\sendmail.php"

At the Start in, I put this line :

Code: Select all

C:\wamp\www\assetmanagementsystem

P/s : I can get the email when I run it without using Task Scheduler.

johnj
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

### Re: How to run php file in task scheduler ?

how do you know that the program ran successfully?

saramaria
New php-forum User
Posts: 8
Joined: Thu Jul 18, 2013 5:38 am

### Re: How to run php file in task scheduler ?

Hi webmaster,
You can do this My Computer > Tools > Folder Options > File Types. If nothing else, this can also help you verify your settings for them.

Otherwise, you can specify "C:\path\to\php.exe [file]" in the task.

thanks
saramaria
Hire php developers