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] Cron setup

I am trying to get email into tickets working. If I am logged into osTicket it pulls just fine. I have setup a cron file, and imported into crontab, but it is not working. I am sure its an issue on my end as i am not very versed with cron/ CLI. 

here is what i have...
ostcron.txt containing
*/1 * * * * nobody /usr/bin/php /Library/Server/Web/Data/Sites/Default/support/api/cron.php
the paths are correct for the location of php and cron.php

in terminal i then ran 

crontab /Library/Server/Web/Data/Sites/Default/support/ostcron.txt

when i do a crontab -l i get the result:

*/1 * * * * nobody /usr/bin/php /Library/Server/Web/Data/Sites/Default/support/api/cron.php

I am running this on MAC  OS X Server 3.2.1

Anyone see something glaring?



  • edited October 2014

  • Not so familiar with MAC OS X server, but under linux I would do a

    crontab -e

    to edit the crontab instead of crontab /Library/Server/Web/Data/Sites/Default/support/ostcron.txt

    Beside that, can you see in the system log any info if the cronjob is execute? In linux the log files are under /var/log/ usually and the default log file is called "messages", but I have no idea if it's the same under mac os x server.
  • found an error...

    /bin/sh: nobody: command not found
  • the "nobody" is saying run this as use nobody.
    You should change that based on the user you want it to run as and/or customize it tor your OS.
    I'd try to just remove it and see what happens.
  • been a while, but i have reinstalled everything and again, its working when i am logged in as a user to OSTicket, but cronjob is not working. i created the cron job using crontab -e as suggested, and updated all file paths.

  • edited February 2015
    now running:

    OSX 10.10.2
    PHP 5.6.4
    OST 1.9.5
    OSX server 4.0.3
  • And what happens when the script is run...  is it logging an error?

    Have you enabeld Email Fetching: at Admin panel -> Settings -> Emails [and disabled Fetch on auto-cron] ?

    HAve you checked your mail server logs to see if the connection is getting refused / and why?
  • I got it all to work! I just had to keep beating it into the system. also there were some errors with the file path to php, which i have fixed. Thanks everyone for your help!
  • Very welcome.
    I'll mark this thread as resolved and close it.
    Please feel free to start a new thread if you have another question, comment, etc.
This discussion has been closed.