Email fetching
nobius
As I chose to use Auto Cron, I have NOT created any cron jobs at all, just the config above.
I realise that means this will only work whilst an agent is logged in, so I chose 120 for the field on session duration and leave the agent logged in for hours. Still no fetch and no log messages. Not sure quite what's happening
thanks
- Best Answerset by ntozier
There has to be agent activity..not just being logged in. You really need to setup a cron job to automatically poll the mailbox without any action from a human. This will be the most reliable. Also, please don't revive old, dead threads. Instead you should find a recent one or create your own.
Cheers.
Hi Kevin,
Can we still turn on auto-cron in the setting while another cron job is running?
It is definitely not recommended. You can run into a scenario where cron is running and auto cron is running at the same time and create duplicate tickets, etc. so it’s an either-or situation.
Cheers.
Got it. Thanks for your prompt response.
I've been trying to create a server cron job for months and it just won't work. If I use PHP5 the server replies with an error, if I use 7+ there is an error, no matter what I do the server returns an error and I have no idea why.
- Edited
We dropped support for PHP 5.x YEARS ago. What version of osTicket are you running?
Cheers.
As I said Kevin, the message changes depending on the version of PHP I use to run the cron, it fails regardless of what the version is. You can see if I change it to PHP 8 it still errors:
I use 1.17.2 on one website and 1.17.3 one the other
With 1.17.x only PHP 8.0-8.1 is supported. If you use PHP 8.0-8.1 and get errors then you need to follow the advice shown in the message and contact your hosting provider.
/path/to/php /path/to/osTicket/api/cron.php
is all you need.
Cheers.
Thanks Kevin, I will contact them
The cron job interval should align with your email traffic and system capacity. Setting it to run every minute can be resource-intensive, so it's essential to balance frequency with server performance.