Jump to content

Scheduled Tasks issue


ierpe
 Share

Recommended Posts

Hi,

I am not very familiar with microsoft OS.

I am trying to setup a scheduled task that will launch a php script (using php-cgi, so its more like a shell script written in php).

In a command prompt, the command I want to schedule is:

C:\myfolder>php script.php

I tried to set up a scheduled task running the command:

C:\Program Files\PHP\php.exe C:\myfolder\script.php

or C:\myfolder>php script.php, etc.

but it doesnt work.

(I also tried "C:\Program Files\PHP\php.exe C:\myfolder\script.php", "C:\Program Files\PHP\php.exe" "C:\myfolder\script.php", etc)

And i've been googling for a while but couldn't find the solution!

1) What do I have to write in the scheduled task to make php execute my script?

2) Is it possible to have these 2 cases:

- the script is ran in the background

- a command prompt opens and executes the script, allowing to view the ouputs of the script

Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy