Configuration of cron (rocky linux)

Hello, again
so i cannot figure out where is problem with cron on our rocky linux invoice ninja. The version of software do not change behavior

  • v5.7.12-C124
  • no cron triangle in app
  • can send recurring invoices manually using CLI or with old v4 cron tasks php artisan ninja:send-recurring
  • while running cron task php artisan schedule:run in logs i see No scheduled commands are ready to run.
  • tried other variations of cron tasks from Free Source Available Invoicing, Expenses & Time-Tracking | Invoice Ninja
  • laravel log show last log from week ago, nothing with cron
  • cron log after 50 hours still show only No scheduled commands are ready to run.
  • it is not a shared hosting.

One solution could be to run v4 tasks, but there may be incompatibility issues in future


When you say “can send recurring invoices manually using CLI or with old v4 cron tasks php artisan ninja:send-recurring” are you referring to invoices from v4 or v5?

What is the queue set to in the .env file?

Manually via CLI - when i go to var/www/invoiceninja and run command php artisan ninja:send-recurring ot when i put this command in cron. This command was used in v4? Now, in v5 we should use schedule:run

The version of the invoice ninja is v5.7.12-C124
Recurring invoices are only 2 weeks old, and are set to send daily (to test functionality)

In .env file there is QUEUE_CONNECTION set to sync

That’s correct, that command is only used in v4. In v5 we now use schedule:run.

Are the recurring invoices set to active?

Yes they are set to Active. (tried it with multiple clients)

It even shows date of next scheduled send - 18 sept 2023 7 am
which was no triggered

Is the cron set to run every minute?

yes, it is set to * * * * *

I totaly forgot: If i create new client or new recurring invoice, it will be stuck at waiting status

In the initial post you wrote “can send recurring invoices manually using CLI”

What do you mean by that?

It means:

  1. connect to server via ssh
  2. log in as root
  3. go to /var/www/invoiceninja
  4. run command php artisan ninja:send-recurring
  5. status of waiting recurrig invoice will automatically change to active, and i will recieve e-mail about new invoice

Sorry, I don’t understand. That artisan command only affects v4.

well, i also do not understand, i just tried it, as i found it in different discussion. It worked. But it is tmp fix. So i think that i will try to do clean install of the linux, db and invoice ninja,

Do you have both the v4 and v5 apps installed? I wouldn’t expect that command to have any effect in v5.

No, there is only one installation of invoice ninja. The problem is i do not know the first version which was installed, because i did not install it.

v4 and v5 are separate apps which need to be installed separately.