[Labs-l] Having some trouble running a cronjob
Hay (Husky)
huskyr at gmail.com
Sun Jan 3 21:04:02 UTC 2016
Hey everyone,
i'm trying to run a cronjob on Tool Labs, but i'm having some issues.
My crontab looks like this:
0 * * * * jsub -N cron-tools.hay-1 -mem 700m php
/data/project/hay/lib/crawl-tools.php
This is the cronjob updating the Tools Directory. It doesn't seem to
update things. When i look at the cron logs, i see this error:
PHP Parse error: syntax error, unexpected '[' in
/data/project/hay/lib/class-directoryapi.php on line 46
Line 46 states:
$tools = [];
So, the only thing i could think of is that for some reason a
deprecated PHP version that isn't supporting the shortened array
syntax (available since 5.4) is running cronjobs. But when i run the
php command from the shell
$ php --verson
I get 5.5 as the version, and running the task directly
$ php /data/project/hay/lib/crawl-tools.php
Works perfectly fine.
I tried looking at the help pages, but i can't find any solution there.
-- Hay / Husky
More information about the Labs-l
mailing list