GiuseMX
September 4, 2022, 11:32am
1
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!
hillel
September 4, 2022, 11:42am
2
Hi,
Is it possible the cron is configured to run more than once at a time?
@david any thoughts?
GiuseMX
September 4, 2022, 11:58am
3
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?
hillel
September 4, 2022, 12:09pm
4
It looks like you’re running both the the v4 and v5 crons.
For v5, schedule:run should only be run once
1 Like
GiuseMX
September 4, 2022, 12:12pm
5
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
hillel
September 4, 2022, 12:30pm
6
Those two lines are running the same command, you only need one of them
This may explain the problem you’re having
1 Like
xoo
September 5, 2022, 7:41am
7
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