Schedule Task on Windows Server

Hi,

I wanted to configure scheduled task for my site on 9.1.1, however it is hosted on a Windows Server running Apache web server. How do I run Windows Task Scheduler to run concrete/bin/concrete concrete:scheduler:run and also the other automated tasks?

Sounds like the right idea to use Task Scheduler on Windows. Is PHP available in %PATH%, i.e. do you get a 'php' is not recognized as an internal or external command or something else if you do a plain php --version on the command line? If there’s no error, you can probably cue up the X:\Path\to\site\concrete\bin\concrete.bat as a Task Action and put the concrete:scheduler:run stuff in the Add arguments field and maybe put the bin path in the Start in field.

If you did get an error trying to call php without its path, you should try to locate the binary and use its full path in the Program/script field. Then put concrete followed by concrete:scheduler:run in the arguments keeping the path as the working dir as above.

This probably needs to be done via the Create Task rather than Create Basic Task route so you can specify the executing user to be the one that’s running Apache and serving Concrete so that the user permissions line up.

Thanks for this! I have tried it and it works well on my task scheduler. All i was missing was the .bat extension in the path.

Cool! Glad to hear it. :slight_smile: