Ein sonniges HALLO an alle!
Ich habe folgendes Problem und komme leider nicht weiter..
Ich habe ein Frontend-Modul, in der config.php wird ein CronJob aufgerufen/ausgeführt
PHP-Code:
$GLOBALS['TL_CRON']['minutely'][] = array(
'Automator', 'updateImmos'
);
Im Ordner „classes“ liegt die Datei Automatir.php mit der Klasse Automator
PHP-Code:
class Automator extends \Contao\Automator
und der
PHP-Code:
public function updateImmos()
In der Log Datei steht nun folgender Eintrag
PHP-Code:
[2020-08-13 08:35:28] request.CRITICAL: Uncaught PHP Exception Symfony\Component\ErrorHandler\Error\UndefinedMethodError: "Attempted to call an undefined method named "updateImmos" of class "Contao\Automator"." at XXXXX/vendor/contao/core-bundle/src/Cron/LegacyCron.php line 92 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Attempted to call an undefined method named \"updateImmos\" of class \"Contao\\Automator\". at XXXXX/vendor/contao/core-bundle/src/Cron/LegacyCron.php:92)"} []
In der angegebenen Datei steht dann folgendes:
PHP-Code:
Using $GLOBALS[\'TL_CRON\'] has been deprecated and will be removed in Contao 5.0. Use the "contao.cronjob" service tag instead.
Kann mir jetzt jemand helfen, wie ich den Cron Job (wieder) zum laufen kriege?
Ich muss dazu sagen, dass ich mit Contao4 noch kein Modul programmiert habe und auch dieses nur übernommen habe.
Ich habe mir die Infos zu dem Service Tag schon angesehen, verstehe das aber leider nicht und hoffe hier jetzt Hilfe zu bekommen.
Vielen Dank schon mal im Voraus!!
Lesezeichen