I have v4 installed on the same server and cron is working with /opt/alt/php72/usr/bin/php /home/myaccount/invoice.mydomain.com/artisan ninja:send-invoices
Invoiceninja v4 installed on same server and cron is working with /opt/alt/php72/usr/bin/php /home/“user”/invoice.“domain”.com/artisan ninja:send-reminders
cron job set to run every minute!
v5 on same server trying with /opt/alt/php72/usr/bin/php /home/“user”/portal.“domain”.info/artisan schedule:run cron daemon reports: Composer detected issues in your platform:
Your Composer dependencies require a PHP version “>= 7.3.0”. You are running 7.2.34.
Corrected path to /opt/alt/php73/usr/bin/php /home/“user”/portal.“domain”.info/artisan schedule:run
First run reports:
Running scheduled command: ‘/opt/alt/php73/usr/bin/php’ ‘artisan’ queue:work > ‘/dev/null’ 2>&1
Running scheduled command: ‘/opt/alt/php73/usr/bin/php’ ‘artisan’ queue:restart > ‘/dev/null’ 2>&1
Running scheduled command: App\Jobs\Util\SchedulerCheck
In Connection.php line 678:
could not find driver (SQL: select * from information_schema.tables where t
able_schema = user_dbname and table_name = accounts and table_type = ’
BASE TABLE’)
In Exception.php line 18:
could not find driver
In PDOConnection.php line 38:
could not find driver
Second run reports:
Running scheduled command: ‘/opt/alt/php73/usr/bin/php’ ‘artisan’ queue:work > ‘/dev/null’ 2>&1
The dashboard still reports “The crons need to be enabled”
n Connection.php line 678:
could not find driver (SQL: select * from information_schema.tables where t
able_schema = user_dbname and table_name = accounts and table_type = ’
BASE TABLE’)
In Exception.php line 18:
could not find driver
In PDOConnection.php line 38:
could not find driver```
it looks like you are missing the PHP MYSQL/PDO driver for the selected PHP version you are using.
Notes for shared hosting PHP 7.3 and cron job w. cPanel
I need PHP 7.4 for another site and don’t have the Multi PHP Selector so i AddHandler for PHP 7.3 in ninja/public/.htaccess
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
v5 cron job on first run.
FYI it seems the cron needs to run a few times on a fresh install before it stops showing error in dashboard, this can complicate things for a noob like myself when the cron is set to run only once every 24h.
I set the cron to run every minute and the cron emails looked as follows.