zotya’s got it. You’re essentially just running php artisan ninja:send-invoices (or send-reminders). The rest is just telling the system where to find the things you want to run.
From the images you provided, it looks like the system is doing a guided setup of a cron, in which case using the actual syntax won’t work. It seems to be having an issue because it doesn’t recognize the schedule portion of the cron, as it’s expecting just a simple command. It will probably ask you when you want the command to run on a different screen.
Also, be sure you’re using the actual PHP path for your particular setup. There’s always a chance it’s located somewhere other than /user/local/bin.
not sure about which php version i should specify tho…
many thanks,
Robin.
On Linux :
In Plesk for Linux, the PHP binary (the php file) is located in the following path:
/opt/plesk/php/<PHP version>/bin/php
Here <PHP version> should be replaced with a particular PHP version number.
For example, if your domain uses PHP version 7.0, use the following command to run the my_script.php script:
Ok I apparently managed to specify the good paths for both Artisan and the command, but still an error, this one below :
PHP Parse error: syntax error, unexpected ‘$value’ (T_VARIABLE) in /var/www/vhosts/musasabi.me/manage.musasabi.me/ninja/vendor/aws/aws-sdk-php/src/functions.php on line 36
PHP version should be 7.0, 7.1, or 7.2 (they don’t support 7.3 yet, IIRC). For future reference (seeing as you have console access), using which php will give you the path to your PHP binary. php -v will tell you what version your system is running.
Domains, click on your domain name, then click on Scheduled tasks on the right side, then Run PHP command, then select path of artisan, and type in the command to execute (ninja:send-invoices)
Select the PHP version of the task (that’s where I had the last PHP parse error)
Save and Execute the cron task.
Hello @titanfail, i know this is a 2 year old topic but when i was going through the conversation in search of answers i got here where you mentioned what PHP artisan is, which was very helpful to clarify the confusion I’m currently having about cron Jobs,
i have installed Invoice Ninja v5 via softaculous in cPanel, Due to cost issues I’m replacing WHMCS with this Invoice ninja V5 self Hosted install and I’m trying to set it up so i can manually recreate my 30 customer accounts and also make use of recurring invoices.
so my question to you or anyone who can help is about this cron command:
/usr/local/bin/php /var/www/ninja/artisan ninja:send-invoices
DO I JUST PASTE IT LIKE THAT ?
or to my incomplete understanding: do i replace USER with my cpanel user & PHP with my cyrrent php version 7.4, and WWW. do i replace it with public.html then lastly NINJA do i replace it with the cPanel subdomain directory name where i installed my versio like this: /My-cPanel-user/local/bin/ea-php74/public_html/My-cPanel-Ninja-DIrectory/artisan ninja:send-invoices