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

Setting up Scheduled task to check for new mail


I have read the forum posts and the pages on the OsTicket FAQs but still can't quite get this working. My OsTicket is running on a WAMP server on a Windows 2012 OS.

I have setup a scheduled task to run the cron.php file on the server, however, each time it runs I get the windows message asking me how I want to deal with .exe files (select a program to use in the future).

Could someone please advise me on how I should be calling the cron.php file when setting it up in Windows Scheduler? I would very much appreciate it.



  • This is how I do it under 1.6ST and it should be mostly the same:

    1. create a .bat file (you can name it whatever you want. Mine is called ostiicket_mail_check.bat.

    2. put the M:\path\to\php.exe -f M:\path\to\osticket\api\cron.php in it.
    Make sure that you edit this to fit your installation. example mine looks like:

    C:\Progra~1\PHP\php.exe -f c:\Inetpub\wwwroot\sitename\api\cron.php

    3. create a shortcut to the bat.

    4. configure windows task scheduler to call the shortcut.
  • Thank you for your response.

    I have done that, but the PHP.exe window which opens up doesn't seem to do anything. It hangs around for a while and then closes - but no emails are forwarded. I can see that there are email in the inbox ready.

    If I run "C:\wamp\bin\php\php5.4.3\php.exe" it opens up a blank PHP command window with "C:\wamp\bin\php\php5.4.3\php.exe" in the title.

    If I run "c:\wamp\www\helpdesk\api\cron.php" it opens up a text file with the cron.php text in it.

    If I run "C:\wamp\bin\php\php5.4.3\php.exe -f c:\wamp\www\helpdesk\api\cron.php" the php.exe command window opens up black, hangs for a few seconds and then closes again. Again, no email is picked up and added into OSTicket.

    I'm really lost here...
  • This worked a treat @ntozier - thank you! Emails are finally being retrieved.
Sign In or Register to comment.