Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

[resolved] Using Windows Task Scheduler to run Cron

I am running Windows Server 2012 R2 I created a basic task to run with the action, "c:\php\php.exe c:\inetpub\wwwroot\support\api\cron.php". When I tell the task to run I get a pop up box asking "How do you want to open this type of file(.exe). Look for an app in the store". I have other tasks that use .exe programs in their actions and they run without problem.

Comments

  • We dont run 2012 R2, we run 2008 currently but try using:
    "c:\php\php.exe -f c:\inetpub\wwwroot\support\api\cron.php"

    What we actually did is write a .bat file like this:
    C:\Progra~1\PHP\php.exe -f c:\inetpub\wwwroot\support\api\cron.php > log.txt

    Then we call the .bat file.
    the > log.txt logs the results of running cron to a file in the same dir called "log.txt" so we can see if there is anything weird going on.



  • That suggestion didn't work either, so I tried the .bat file method. It seems to run, but doesn't create a log.txt file.
  • I do not have a 2012 box to test on right now sadly.  Is your osTicket tossing email now?
  • Bump, did this work?

    Thanks
  • Since this thread was written and replied to back in 2014.  We've upgrade to server 2012 R2 and my original reply stands.  Change the paths to suit your environment.

    Closing ancient zombie thread.

    Please help us to help you by reading and following the posting guidelines located in this thread: Please read before requesting assistance.  The more information you give us the better we will be able to assist you. Thank you.
This discussion has been closed.