I see there is a similar thread but I don’t think I should pin to it, because my problem is slightly different.
Anyway, I have problem with sending of recurring invoices. Invoices are generating and saving as drafts, but send is not happening.
I’m sure of a few things:
I can send emails with invoices manually, it works everytime manually. By recurring invoice, it is not working.
No errors in laravel.log.
I have the newest version of Invoice Ninja.
Recurring invoice changed Last Sent Date and Next Send Date.
Every recurring invoice has settings for endless cycle and sending every month, no auto payment.
No logs in these generated drafts, seems like invoices were never sent.
I read similar threads and sadly didn’t find any clue for solving this problem. What do you think?
I’m having the same problem, already checked the “auto email” and it was already enabled.
I have some recurrent invoices that were supposed to be sent 3 days ago, it shows “Actif” in the status, but the “next send date” it’s still the same and the invoice was not created.
I have run the command line : * * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
Without the “* * * * *”, it doesn’t work on my server with it.
but, the result is just nothing and I don’t know how to check.
I’m connected in a SSH client to do that, I have done for the email configuration and it’s working. but not the recurrent invoice.
I saw the message " Ensure you set the scheduler under the web server user i.e. sudo -u www-data crontab -e" but I don’t have a root acces. Do you think it could be it? Can I check this if it’s enable?
Can you help me with the cron? I’m not an expert on that
If you are on shared hosting, then i believe the actual webuser will be the correct one, so we can exclude that as an issue.
You may want to have a look at your other cron configurations, It may be that your cron needs to define all the full PHP path.
I would also suggest changing >> /dev/null 2>&1 to a file where you can monitor the output of the cronjob so that you can inspect for any errors that are being thrown.
Thank you for the information.
I have a “Cloud server Linux”
I’ve tried to do everything I found in the internet.
I saw in the “check system” it had a “Cron not enabled” and after changing some things, used the “artisan optimize” now it desappeared.
but, when I try to run the https://invoiceninja/webcron?secret=secret, it shows “{“message”:“Web cron has not been configured”}” and the recurrent invoices are not been sent/created.
I created a file to save the logs and the last I have is this one :
"
2023-02-13 11:40:57 Running [queue-size-job] … 6ms DONE
2023-02-13 11:40:57 Running [Callback] … 17ms DONE
INFO Processing jobs from the [default] queue. "
Just a new information…
When I changed the .env file to “QUEUE_CONNECTION=database” the message from “QUEUE not enable” desapears but the problem continues and I can’t send the emails directly, I need to use a command line “artisan schedule:run” to send all the emails I tried before, so, I put back the “QUEUE_CONNECTION=sync”
When I try “artisan ninja:send-recurring” it works.
I don’t know if is something connected to the user, I read something about the “www-data” user, but I don’t think I have access to that.