Record cannot be modified right now: This cron task is currently being executed and may not be modified Please try again in a few minutes
This kind of problem and error message is happening when you tried to install an Odoo module. Regardless if you bought a new, or, created your own.
The main cause of this error message is that there are a background task that currently running and need to be waited until it's done. But somehow, the task feels like forever–because I had a case where it last long for 5 days or so.
Instead of waiting that long, you can just simply find out the main cause and stopping that process. The step below is for Linux Debian Machine, but you can follow along if you are using other machine. You just need to find the same command that equal to these process.
- First things first, login to your server as root.
- If your server is running Odoo, make sure to stop the operation of it by typing service odoo stop.
- Later on, switch to postgresql by typing su - postgres
- Then type in psql
- Try to remember what is your odoo database name, because you want to connect it by typing \c yourDatabaseName.
- After that, you need to find all of the running background task (or also called cron) using a postgresql query, which is you should type in SELECT * FROM ir_cron;
- All of the process will be shown in your screen. Now, you need to identify which one of these process that make your server execute a long process. As my experience happened in past, mostly the problem is caused by indefinite process of Mail : Email Queue Manager as picture show below.
ir_cron table, list of running process
- If you find it, try to kill the process by typing UPDATE ir_cron SET active = False WHERE id = (selected_id). Change that selected_id with the number that you see on the left of the screen inside the table.
Killing a process
- Try to run your odoo again by exiting the the psql session by typing exit
- After that, run odoo process again by typing service odoo start.
- Go on try and install your module. If the problem still persist, you need to find the right process that taking your server loading time. Or, sometimes you also need to restart your entire server for it to be applied. It's quite random but it will take some time, and it will do!