Run php script in task scheduler

That means that there is a syntax error… Have you considered adding a bash script that calls it rather than calling it directly?

i have tried created .bat file call the php script using that .bat file. The result show successfully run but it actually didn’t work.
this is code for my code .bat file

php D:\Inetpub\wwroot\15G_order\NewGeneration.php
pause

So, you have other files that will execute without an issue and this is the only one that wont?

Is it owned by another user or in a different directory? Is it executable?

Trying to walk through scenarios first rather than create additional scripts that may not be needed.

So, you have other files that will execute without an issue and this is the only one that wont?

  • Yes, i got 5 task and 4 of them works properly but not this one.

Is it owned by another user or in a different directory? Is it executable?

  • it is all owned by the same user and in the same directory.

Any idea on why this might happen? As i googled they said it maybe from different user but mine is under same user

try changing the “run in” to the quoted value and manually kick off the task

sorry but i quite don’t understand by what you meant

Start in section, sorry.

You mean remove the " " in program/script section?

No, the start in input. What do you have there?

in start in, I put it blank

make it,

D:\Inetpub\wwroot\15G_order\

I already put it in the start in input but still got 0xff error
error6

Hmmmm

this may sound odd. Is there logging in the php script?

What is meant by logging?

writing to a file

This is my code.


when i run manually, it works.

That starts at line 17?

When you run it manually, you trigger it through the command line as well?

The code actually start like this

Use the absolute path for the require_once file.

Sponsor our Newsletter | Privacy Policy | Terms of Service