I want to have Scheduled Action that executes one after another from 1AM to 6AM everyday.
How can I achieve this?
Since the only menus I have are "Execute Every" and "Next Execution Date" I do not know how can I mention the specific hours range. I am using Odoo 11.
You can use a wrapper action which is scheduled to run more frequently.
def action_function():
# you will need to store a value (is_running: True|False) in the database, maybe in ir.config_parameter
if current_hour not in (1, 2, 3, 4, 5):
return None
elif is_running:
return None
else:
# Mark that the action is in process, have to commit to the database
is_running = True
self.env.cr.commit()
# Then call your actual action function
do_some_real_thing()
# Mark that the action is done
is_running = False
Basically, the wrapper action of below steps repeats frequently like every 10 minutes.