osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now
Email not fetching on cron
We're using OS Ticket and during the day whilst we're using it it will happily fetch emails from the configured inbox.
However it won't fetch them on a cron so we don't get alerts sent to the techs when a new ticket is pulled from the tickets inbox. I can't see howto get this to work
I set up a cronjob as follows
* * * * * /var/www/get2.sh
to run my script every minute.
script get2.sh is:
echo "getting mail 2" >> cronlog_$(date +\%Y-\%m-\%d_\%H-\%M).log
/usr/bin/php /var/www/html/help/api/cron.php >> cronlog_$(date +\%Y-\%m-\%d_\%H-\%M).log
and its set to executable
-rwxr-xr-x. 1 root root 155 Sep 28 14:56 ../get2.sh
this runs and creates datestamped files so I know its running. The datestamped file only contains one line, no output from cron.php
I tried adding echos into the cron.php file to work out how far it was getting but i just kept getting errors about headers already sent.
wget -q -O /dev/null --user-agent=<API key here> http://<host & path goes here>/api/cron.php
but when I ran it like this
wget --user-agent=<API key here> http://<host & path goes here>/api/cron.php
i got this message :
cron.php only supports local cron calls - use http -> api/tasks/cron
and that failed saying file not found
So outgoing mails work, incoming mails work when triggered by the loading of OS ticket web pages but running the "get mail" scripts manually or in a cron doesn't work. Any ideas where to start looking?