OsTicket: cron.php funktioniert nicht, Anpassung nötig

Das schlanke Ticketsystem OsTicket bietet die Möglichkeit an, Emails aus einem Postfach zu lesen und daraus Ticket zu machen.

Der favorsierte Zugriff sollte über Cron erfolgen >> http://osticket.com/wiki/POP3/IMAP_Settings

Recurring tasks scheduler (Cron Job)

This is the most convenient method if your hosting provider allows scheduling recurring tasks via crontab on *nix or „Scheduled Tasks“ on a Windows server. Please refer to your hosting manual or contact your hosting provider for instructions. The PHP CLI executable is called to run cron.php.

Add the following entry to cron file normally in /etc/crontab in *nix systems and adjust the time and paths accordingly.

*/5 * * * * nobody /path/to/php /path/to/api/cron.php

For windows users in „Scheduled Tasks“ add "c:\php\bin\php.exe c:\website\osticket\api\cron.php"

Es funktioniert, jedoch nicht immer, unser osticket Paket liegt bei Hosteurope. Dort war es notwendig die cron.php zu modifizieren, damit der cron-Dienst wußte, wie sie zu behandeln ist. Am Anfang wird diese zusätzliche Zeile benötigt.

#!/usr/bin/php

#!/usr/bin/php
<?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(realpath(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');

@chdir(realpath(dirname(__FILE__)).'/'); //Change dir.
require('api.inc.php');
require_once(INCLUDE_DIR.'api.cron.php');
LocalCronApiController::call();
?>