Recurring invoice V5 did not work

Hi, Happy New Year!

Also in V5 I see issues on cronjob and automated recurring invoice.

In the panel I see a recurring invoice in status pending.
The invoice date of sending is 01 January 2021.
The cronjob is set:

php /invoice.domain.ext && php invoice.domain.ext/artisan schedule:run && php invoice.domain.ext/artisan optimize

The results of this cron is:
No scheduled commands are ready to run.
Configuration cache cleared!
Configuration cached successfully!
Route cache cleared!
Routes cached successfully!
Files cached successfully!

No invoice is sent and today is 2 January.
Why pending recurring invoice is not sent and generated?

Hey there. Thanks for reporting this to us.

Can I know how did you install Invoice Ninja? Was it from blogposts here on the forum, Docker or something else?

Thank you.

I installed by FTP as curently cannot use softaculous for install the Beta V5 .

It’s a bug, it’s only me or you can help to understand why I see pending recurring invoice generated from me in 2020 but also if cronjob is set and the recurring invoice is pending, no invoice was generated yesterday…

So today tried the cron manually and the result is what I say.
What is wrong?
The cronjob is correct? I think yes as it gives results. I need a different cronjob for recurring invoice?

Waiting some news from you. Thanks.

I also seem to experience the same issue, recurring invoices set, the date passes, and no invoices have been issued.

I hope in a solution. thanks for adding.

Thanks for passing additonal info regarding this.

@david can you help with this?

can you post the exact line in your crontab please? also, ensure it is set to the webusers crontab, ie… if you webuser is www-data

sudo -u www-data crontab -e

Speaking of this - I notice in the docker container, all the cron stuff is running in root:

Hmmm

I added the CronJob on my admin panel but also I run manually in SSH.

As I told on my first post I run by SSH the following code:

php /invoice.domain.ext && php invoice.domain.ext/artisan schedule:run && php invoice.domain.ext/artisan optimize

This gives results:

No scheduled commands are ready to run.
Configuration cache cleared!
Configuration cached successfully!
Route cache cleared!
Routes cached successfully!
Files cached successfully!

As I have a recurring invoice not sent I expect this is sent but is not. Why?

What status are the recurring invoices currently?

Is the cron running every minute?

The status is pending (In attesa).
The cron run every morning at 8:00 AM just one time a day… but even if I run manually and I have a pending invoice this recurring invoice should be generated.

Hi @david @ben currently I’m with Version 5.0.54-C39 and recurring invoice still not working.
No reply since my last message.

I have a pening invoice with the pending status and the send date 1 febrary 2021 and a cron than run at 08:05 AM every day.

Maybe the previous command I mentioneted for send recurring was not correct.
The correct cron seems to be: php invoice.domain.ext/artisan ninja:send-recurring

I get an error when I do this:

In Connection.php line 678:

  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'paid_to_date' in 'field list' (SQL: insert into
   `invoices` (`status_id`, `discount`, `is_amount_discount`, `po_number`, `footer`, `terms`, `public_not
  es`, `private_notes`, `due_date`, `is_deleted`, `line_items`, `tax_name1`, `tax_rate1`, `tax_name2`, `t
  ax_rate2`, `tax_name3`, `tax_rate3`, `custom_value1`, `custom_value2`, `custom_value3`, `custom_value4`
  , `amount`, `user_id`, `assigned_user_id`, `company_id`, `recurring_id`, `client_id`, `auto_bill_enable
  d`, `paid_to_date`, `date`, `next_send_date`, `updated_at`, `created_at`) values (1, 0, 0, ?, ?, ?, ?,
  ?, ?, 0, [{"product_key":"L  A S M F C","notes":"A I A
  ativo","cost":800,"quantity":1,"tax_name1":"","tax_rate1":0,"tax_name2":"","tax_rate2":0,"tax_name3":""
  ,"tax_rate3":0,"custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","discount":0
  ,"type_id":"1","createdAt":1607246645849000,"is_amount_discount":false,"sort_id":"0","line_total":800,"
  date":""},{"product_key":"Spese condominio","notes":"Spese condominio","cost":180,"quantity":1,"tax_nam
  e1":"","tax_rate1":0,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"custom_value1":"","cust
  om_value2":"","custom_value3":"","custom_value4":"","discount":0,"type_id":"1","createdAt":160724664809
  3000,"is_amount_discount":false,"sort_id":"0","line_total":180,"date":""}], ?, 0.000, ?, 0.000, ?, 0.00
  0, ?, ?, ?, ?, 980.0000, 1, ?, 1, 1, 1, 1, 0, 2021-02-01, ?, 2021-02-01 15:41:13.619092, 2021-02-01 15:
  41:13.619092))

than:

In Exception.php line 18:
  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'paid_to_date' in 'field list'

and:

In PDOConnection.php line 78:
  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'paid_to_date' in 'field list'

Any solution?

Now also manual invoice doesn’t work anymore:

Update: I’m removing the software from my VPS, too many issues.

If you see an ‘unknown column’ error it probably means you need to run the migrations

php artisan migrate

1 Like

correct, looks like migrations haven’t run.