Recurring invoice create 3 invoice?

Hi,

i setted up a recurring invoice, and i tested it with auto creation daily and weekly.
But i become every time that create the invoice automatically, that create 3 invoice at the same time. The invoicenumber is 1, 2 and 3, that correct, but i don’t setted up to create 3 invoices… Is anywhere an option to fix it?

Thanks a lot!

Hi,

Is it possible the cron is configured to run more than once at a time?

@david any thoughts?

Thanks for the answer @hillel

That’s the crontab config:

0 8 * * * /usr/bin/php8.1 /var/www/invoiceninja/artisan ninja:send-recurring > /dev/null
0 8 * * * /usr/bin/php8.1 /var/www/invoiceninja/artisan ninja:send-reminders > /dev/null
0 8 * * * cd /var/www/invoiceninja/ ^^ /usr/bin/php8.1 artisan schedule:run >> /dev/null 2>&1
0 8 * * * cd /var/www/invoiceninja/ && php artisan schedule:run >> /dev/null 2>&1

Anything wrong?

It looks like you’re running both the the v4 and v5 crons.

For v5, schedule:run should only be run once

1 Like

Oh ok. So you mean i only need the last 2?
Like this:

0 8 * * * cd /var/www/invoiceninja/ ^^ /usr/bin/php8.1 artisan schedule:run >> /dev/null 2>&1
0 8 * * * cd /var/www/invoiceninja/ && php artisan schedule:run >> /dev/null 2>&1

Those two lines are running the same command, you only need one of them

This may explain the problem you’re having

1 Like

But the job should run every minute. You should have just one job that looks like

* * * * * cd /var/www/invoiceninja/ && /usr/bin/php8.1 artisan schedule:run >> /dev/null 2>&1

(Note the asterisks at the beginning.)

1 Like