All necessary Cron jobs for self hosting

Are there resources available that outline all the required cron jobs for when you have QUEUE_CONNECTION=database set in your .env file?

We updated queue_connection to database to fix resolve an issue (can’t remember what exactly the issue was), and have been trying to work out what cron jobs are required - I think I am close, but our recurring invoices seem to be getting created twice. We currently have;

0 23 * * * cd /my/path && /usr/bin/php -d register_argc_argv=On artisan schedule:run >> /dev/null 2>&1
0 23 * * * cd /my/path && /usr/bin/php -d register_argc_argv=On artisan ninja:send-recurring >> /dev/null 2>&1
0 23 * * * cd /my/path && /usr/bin/php -d register_argc_argv=On artisan ninja:send-reminders >> /dev/null 2>&1
* * * * * cd /my/path && /usr/bin/php -d register_argc_argv=On artisan queue:work --stop-when-empty >> /dev/null 2>&1

(Clarification; /my/path has been substituted above for our actual path)

Thanks in advance (and super sorry if this has been answered somewhere or is hiding in the documentation, but I’ve given up looking after a few days of searching and head scratching).


The run and work commands are for v5 whereas the send-recurring and send-reminders commands are for v4.

My appreciated, Hillel! That seems to have done the trick.

1 Like