[Solved] Cron Job & Synology

Post Reply
onelikenoone83
Posts: 3
Joined: 17 Jul 2020, 16:30
Name: Marco
Location: Italy

[Solved] Cron Job & Synology

Post by onelikenoone83 »

Hi,
i'm new, this is my first post. The App is amazing and until now i have always found the answer in the forum, but this time i have a strange bug.

I'm trying to backup my db with Cron Job on Synology NAS that it's hosting the PM Application.
I have created the Job on my NAS ed i have added this code as suggested:

Code: Select all

/usr/bin/php -q /volume2/web/pm/cron/backup.php
But the Job send me this error:

Code: Select all

PHP Parse error:  syntax error, unexpected ':', expecting ';' or '{' in /volume2/web/pm/includes/libs/php-barcode-generator-master/src/Helpers/BinarySequenceConverter.php on line 13
What's wrong?

thank you in advance
M.
Last edited by onelikenoone83 on 24 Jul 2020, 12:23, edited 1 time in total.
User avatar
support
Site Admin
Posts: 6222
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Cron Job & Synology

Post by support »

Php version 7.2 in cron required.
onelikenoone83
Posts: 3
Joined: 17 Jul 2020, 16:30
Name: Marco
Location: Italy

Re: Cron Job & Synology

Post by onelikenoone83 »

Hi,
Php version on my NAS is 7.3.

Thanks
User avatar
support
Site Admin
Posts: 6222
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Cron Job & Synology

Post by support »

Php version in cron can be different. Ask your hosting support.
onelikenoone83
Posts: 3
Joined: 17 Jul 2020, 16:30
Name: Marco
Location: Italy

Re: Cron Job & Synology

Post by onelikenoone83 »

Perfect, i changed the path and now works!

Code: Select all

/usr/local/bin/php72 -q /volume2/web/pm/cron/backup.php
thanks
M.
Post Reply