An ir.cron issue

an ir.cron record is sometimes created during an update of a custom module, sometimes not.
fixed xml code :

woocommerce.orders|store minutes woocommerce.function|store_test minutes woocommerce.invoices|make_invoices minutes

On the scheduler’s page, sometimes only one item appears in tree view. (4 records in database)

It is not clear what you want to show with this?

Be sure to close the client after a database update because it cache for 1 day every views.

I can’t copy the code, so I join a file to the message.code

“It is not clear what you want to show with this?”
What do you mean ?

“Be sure to close the client after a database update because it cache for 1 day every views.”
1 day, well I got the answer for the issue “Issue during custom module’s update”.
thank you.

code can be display inside code block:

```
code
```

I do not understand what this “fixed xml code” mean or is supposed to represent.

Are you sure you connect to the right database (on which the custom module is activated)?
Are you sure your XML file is always loaded when you update the database? If not, Tryton will delete records that it does not find anymore in a module.

“fixed” usually means “corrected”, i just meant I don’ change it.

Yes, there’s only one database (and this database is selected during login).
The issue 's still there.

The problem isn’t Tryton delete something :

an ir.cron record is sometimes created during an update of a custom module, sometimes not.
Why an ir.cron record yet present in the database appears again with a new id, whereas the xml of the file with ir.cron hasn’t changed ? How is it possible ?

It’s not a problem of a “1 day every views”. If i load another view then refresh comes to it again, it’s ok. Looks like a javascript issue.

Well, the global issue was :
1 - I was changing something in the module
2 - I was updating it
3 - A new record often appears “from nowhere”
4 - SO I had (but I didn’t know it until you told me) to “close the client after a database update” in order to have the module updated.

I know now how to deal with it, but the 2 issues I’ve written in this post still occur.
Maybe it can help you improve your software.

Probably because the XML files are not always loaded.
Maybe the tryton.cfg is changed. Maybe the XML file is changed. Maybe some code delete record.

Patch is welcome Tryton - Get Involved

Une autre possibilité serait qu’il y a plusieurs version du module sur le système (par exemple en global /usr/lib/python3/site-packages et en locale ~/.local/lib/python3/site-packages). Et qu’en fonction de l’utilisateur ou de variable environnement (PYTHONPATH) l’un ou l’autre module est utilisé. L’un n’a pas la définition du cron dans le XML et l’autre bien, d’où la basculement entre la création et la suppression.