Seems my crons are not working now, error message below:
Mon, 26 Apr 2021 13:18:26 +0000 Running SendRecurringInvoices…
In Account.php line 1126:
a ? b : c ?: d is deprecated. Use either
(a ? b : c) ?: d or
a ? b : (c ?: d)
I been using PHP version v7.3.27, running Plesk Obsidian, CentOS 7.9.2009
What do you see if you run
PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.0.3, Copyright (c) 2002-2017, by ionCube Ltd.
But plesk always shows the default php with this command, when you setup a domain you choose which version of php, I also verified in my theme that i a running 7.3.27 and its set correct.
This issue happened all of a sudden, everything has been working fine for about a year or so.
I suggest checking with your webhost, my guess it the CLI PHP version is now PHP 7.4.
Does v4 invoiceninja run on PHP v7.4?
No, to support PHP 7.4 you would need to upgrade to v5
I have solved the issue, for some strange reason my old crons stopped working, after many trial and errors for those trying to get a Plesk Obsidian cron working correctly for Version 4.5.38 (as the past posts I read were very unclear), here is the code:
Go to Admin/server/tools/ Schedule a Task (Cron jobs), click Add a Task, Choose Run a command, Add the code from below changing the php version, the sitename and the installation folder name) Set the time to run (24 hour clock) click OK
/opt/plesk/php/7.3/bin/php -q /var/www/vhosts/sitenam.com/httpdocs/installation folder name/artisan ninja:ninja:send-invoices
/opt/plesk/php/7.3/bin/php -q /var/www/vhosts/sitename.com/httpdocs/installation folder name/artisan ninja:send-reminders