Plan a task that will execute a batch file.

Hi,
I have a batch file with the following:
c:\php\php.exe  c:\scripts\myScript.php

what should be the syntax for making the file running by a task.
Thanks.
bruno_boccaraAsked:
Who is Participating?
 
imnajamConnect With a Mentor Commented:
Hi leew,

a task can also be sheduled keeping it as it is in double quotes like "c:\php\php.exe  c:\scripts\myScript.php"

Cheers!
0
 
Lee W, MVPConnect With a Mentor Technology and Business Process AdvisorCommented:
I would just put that single line into a file ending in .bat or .cmd and then schedule that file to run in the task scheduler.
0
 
bruno_boccaraAuthor Commented:
In fact I made a .bat file, and the good syntax is:
"c:\php\php.exe"  "c:\scripts\myScript.php"

but this only works when running the .bat file mannualy (right clik on the file and execute, or in a prompt).

It DOESN'T work in a schedule task or when doing right click on the task then execute.


0
 
star_trekCommented:
WHich user account are you using? may be the account that you set for the batch fie might not have perms to access all the resource. If you are not using an admin account then i suggest you to try using that
0
 
r-kConnect With a Mentor Commented:
Try to schedule with the AT or SCHTASKS command using the System account (the AT command does that bt default)

An example and more info is in this recent thread:

 http://www.experts-exchange.com/Operating_Systems/Windows_Server_2003/Q_21862784.html
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.