I have a batch file daily.bat, this is the code:

cd C:\inetpub\wwwroot\infoweb\factuur\cron

c:\PHP\php.exe -f ./cron_pdf.php

ftp -s:ftp_upload.txt ftp.infoweb.be

And I created a task with task scheduler in windows 7. When I run the batch manually, everything goes fine, but when I try to run it with the task scheduler nothing happens.

My action is 'run script' "C:\inetpub\wwwroot\infoweb\factuur\cron\daily.bat"

UAC is off and I am Admin.

Any idea why this is not working?

Thanks

link|improve this question
This is a better fit for super user - it should get transferred there automatically. – Iain Dec 14 '10 at 9:50
how do I activate the super user? – Ruben Dec 14 '10 at 9:55
got it Net user administrator /active:yes. – Ruben Dec 14 '10 at 9:56
nope not helping either – Ruben Dec 14 '10 at 9:59
wait the script is working now, but I just can't see the cmd prompt – Ruben Dec 14 '10 at 10:05
feedback

migrated from serverfault.com Dec 14 '10 at 10:27

This question came from our site for system administrators and desktop support professionals.

2 Answers

ok it is working now this is what I did, you probably won't need all these steps to make it work but just to be sure try them all:

  • Check the account parameters of your scheduled task and make sure they are set to run whether or not someone is logged into the machine

  • check run with most privileges/rights

  • Make sure you go to the full path first: cd C:\inetpub\wwwroot\infoweb\factuur\cron

  • Don't use double quotes in your batch files (don't know why but seems to help)

  • Be super admin, enter 'Net user administrator /active:yes' in command prompt, log out and log in as the super admin, so UAC is off

Thanks guys

link|improve this answer
feedback

Check the account parameters of your scheduled task and make sure they are set to run whether or not someone is logged into the machine and the password is saved

link|improve this answer
thanks but I already did that, and I also checked run with most privileges/rights – Ruben Dec 14 '10 at 9:52
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.