2

I'm using Windows Server 2003 to try and execute a PHP script every day at 9AM. Here's the command inside of run:

"C:\Program Files\Zend\ZendServer\bin\php.exe" C:\Program Files\Zend\Apache2\htdocs\signout\teachernotify.php

It's supposed to execute the PHP script above which is supposed to e-mail me, but it doesn't work. Accessing the script above through a browser works, but not through Scheduled Tasks.

When I run it through the task scheduler, it goes through like something happened, but it doesn't appear to work.

Any advice?

Thanks

1 Answer 1

1

It sounds like it could be a permissions problem. When run through Apache via a web browser, the permissions would be based on whatever permissions Apache is running under. As a scheduled task, the permissions are based on the user specified for the task.

Make sure that the user specified in the "Run as" field in the task settings dialog has permissions to send an email.

Based on your most recent comment, it seems the problem is that the filename needs double quotes around it. I failed to notice that in the original question.

"C:\Program Files\Zend\ZendServer\bin\php.exe" "C:\Program Files\Zend\Apache2\htdocs\signout\teachernotify.php"
Sign up to request clarification or add additional context in comments.

5 Comments

Thanks for the response. It's running as the root administrator on the server. Would there be any other reasons?
@zackt147: I don't have any clever ideas. If you simply run that command from a command prompt (dos box), does it work?
It's giving me "Could not open input file: C:\Program"...looks like it's breaking on the space.
It appears you figured it out. Putting double quotes around the path probably has a good chance of making it work.
Wow, not sure how I missed that. Thanks! :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.