跳至内容
菜单
此问题已终结
2 回复
4066 查看

Can we run multiple crons at a time in Odoo?

形象
丢弃

Hi,
It is possible to run multiple crons simultaneously in odoo.
Please refer to this forum answer to understand how to do it without having a heavy load on the system.
https://www.odoo.com/forum/help-1/odoo-configuration-for-multiple-cron-jobs-214041

Hope it helps

最佳答案

Yes, in Odoo, it is possible to run multiple cron jobs simultaneously. Odoo's cron system is designed to handle multiple cron jobs running concurrently.

For example, let's say you have two cron jobs defined in your Odoo module:

  1. Job A: Scheduled to run every hour using a cron expression of 0 * * * *.
  2. Job B: Scheduled to run every day at midnight using a cron expression of 0 0 * * *.

In this case, Job A will run every hour, and Job B will run once every day at midnight. Since their schedules do not overlap, they can run concurrently without any issues.

However, if two cron jobs have the same cron expression and are scheduled to run at the same time, Odoo will run them sequentially, one after the other. Odoo ensures that the jobs do not run concurrently to prevent any conflicts or concurrency-related issues.


形象
丢弃
最佳答案

Hi Guiles,

Reply : In Odoo, by default, multiple cron jobs can run simultaneously. The Odoo scheduler manages the execution of cron jobs, and it allows multiple cron jobs to be executed concurrently, as long as they meet the conditions specified in their cron expressions.

If multiple cron jobs have overlapping intervals or their conditions are met simultaneously, they will be executed concurrently.

However, please note that concurrent execution of cron jobs can impact system performance, especially if the jobs involve resource-intensive tasks or database operations. Therefore, it's important to design your cron jobs carefully and consider any potential conflicts or performance implications when running multiple cron jobs simultaneously.

Regards,

Ksolves Team!

形象
丢弃
相关帖文 回复 查看 活动
1
1月 24
2531
0
4月 22
4181
0
1月 17
4491
0
12月 15
4796
1
9月 15
17081