Skip to Content

Scheduled Actions (Cron Jobs)

Scheduled Actions

Scheduled actions (also called cron jobs) run automated tasks on a repeating schedule. They handle periodic maintenance, data processing, and automated communications.

Navigation

Go to Settings > Technical > Scheduled Actions (developer mode required).

Important System Scheduled Actions

Name Schedule Purpose
Mail: Email Queue ManagerEvery 1 minuteProcesses the outgoing email queue. If this cron is inactive, no emails are sent.
Mail: Fetchmail ServersEvery 5 minutesChecks incoming mail servers for new emails. If inactive, incoming email processing stops.
Accounting: Generate Valuation LayersEvery 1 hourCreates inventory valuation layers for stock moves.
Sales: Subscription Auto-InvoiceDaily at 2:00 AMGenerates invoices for subscriptions due on the current date.
CRM: Lead Scoring BatchEvery 12 hoursRecalculates lead scores based on scoring rules.
Website: Sitemap GenerationDaily at 3:00 AMGenerates SEO sitemap.xml for the website.
Base: Update Currency RatesDaily at 9:00 AMFetches latest exchange rates from configured API.

Creating a Custom Scheduled Action

  1. Click Create.
  2. Name – e.g. "Daily Sales Summary Email".
  3. Model – The model the action works on (most system actions use ir.actions.server).
  4. Execution Frequency:
    • Number of Calls – Run a fixed number of times, then stop.
    • Do Not Repeat – Run once.
    • Repeat Every – Run on a recurring schedule. Specify interval (Minutes, Hours, Days, Weeks, Months).
  5. Next Execution Date – When to run first. Use a future date/time.
  6. Number of Calls Remaining – For repeating actions, this decreases each run. Set to -1 for unlimited runs.
  7. Under Server Action to Run, select the action that executes when the cron fires.
  8. Check Active to enable the cron.
  9. Click Save.

Cron Monitoring

The list view of scheduled actions shows:

  • Status – "Done", "Running", or "Failed". Red background indicates a failure.
  • Last Execution – Timestamp of the last run.
  • Next Execution – When the next run is scheduled.
  • Progress – For long-running crons, shows progress information.

If a cron fails, click the failed status to see the error details in the server logs. Common causes: Python errors in the action, unavailable network resources, or database locks.

Best Practices

  • Schedule heavy operations during off-peak hours (e.g. 2:00 AM).
  • Avoid running crons too frequently – a "Repeat Every 1 Minute" cron that takes 30 seconds may overlap with itself if it starts a second instance before the first finishes. Quickenerp prevents this by checking that the previous instance has completed before starting a new one.
  • Test new crons by setting "Number of Calls" to 1 and a "Next Execution" of 2 minutes from now, then verify it runs correctly before making it recurring.
Rating
0 0

Commenting is not enabled on this course.

This documentation is updated continuously. Some features described here may be renamed, deprecated, or still being finalized.