user1298740
user1298740

Reputation: 137

Running PHP file from command line, how do I hide the prompt?

I have a Scheduled Task that runs a PHP file every 5 minutes.

It runs

C:\wamp\bin\php\php5.5.4.12\php.exe -f "C:\wamp\www\run.php"

That works fine, but every time it runs it opens the Command Prompt window, then once it's done running it closes it.

How do I make it so the Command Prompt window never displays?

Thank you

Upvotes: 2

Views: 2061

Answers (1)

Nicolas Racine
Nicolas Racine

Reputation: 1061

You need to make you task run either an user is logged in or not.

there is in option for that in scheduled task

enter image description here

And with that option you wont see the cmd pop out any more

Edit for solving your question in comment.

Yes you can have the schedule task run every one min with those following option. enter image description here7

Re-Edit

Use the following trigger if you want to run the talk every min at computer start enter image description here

Upvotes: 5

Related Questions