hello,

information:
i try to setup auto cron that fetching emails is working when i am logged out. (now its only fetching emails when admin login)

Server Information
osTicket Version v1.15.2 (cb6766e) — Up to date
Web Server Software Apache
MySQL Version 5.7.32
PHP Version 7.3.28

emails- > settings >
Email fetching : ON enable ON Fetch on auto cron

manage - > api
api is active and ip from server is ok

file on server:

api/cron.php (or see attached file).

`<?php
/*********************************************************************
cron.php

File to handle LOCAL cron job calls.

Peter Rotich <peter@osticket.com>
Copyright (c)  2006-2013 osTicket
http://www.osticket.com

Released under the GNU General Public License WITHOUT ANY WARRANTY.
See LICENSE.TXT for details.

vim: expandtab sw=4 ts=4 sts=4:

**********************************************************************/
@chdir(dirname(FILE).'/'); //Change dir.
require('api.inc.php');

if (!osTicket::is_cli())
die(__('cron.php only supports local cron calls - use http -> api/tasks/cron'));

require_once(INCLUDE_DIR.'api.cron.php');
LocalCronApiController::call();
?>
`

i found lot of forums but all give different ANSWER'S and not succesfully

i think i have to update the file cron.php with the api code ?

or what do i need to update in this file or where in this file ?

or what do i need to change ?

thankyou ivo
![
](https://)

ivobeegden changed the title to Fetching emails NOK need support to setup correct - > Cron setup.

As a side note twice per hour means that new tickets could have a delay of being created of up to 30 minutes. If you find that acceptable okay... but I dont really know anyone else that uses such a high delay.

Delay is ok for me.

I am receiving this from server. Something load wrong..

......cron.php: No such file or directory

Sounds like your path to your cron.php is wrong in the image above.

    ntozier

    after login at the hosting provider i updated settings in hosting provider ''cron job'' with the correct path to cron.php

    now is working 😃

    tip for other users: cron job setting you have to do that in the hosting (or ask hosting provider to activate cron job)and in osticket turn on fetching and auto cron

    ivobeegden changed the title to (Solved) Fetching emails NOK need support to setup correct - > Cron setup.
    ntozier changed the title to [resolved] Fetching emails NOK need support to setup correct - > Cron setup.

    Glad to hear that you got this sorted out. I'll close this thread.
    Please start a new thread if you have another question.

    Write a Reply...