Scheduling Jobs¶
Target Audience: Users, Administrators Difficulty: Beginner Prerequisites: Creating RunTemplates
Overview¶
In MultiFlexi, jobs are scheduled through RunTemplates. The multiflexi-scheduler daemon periodically checks all active RunTemplates and creates a Job record for each one whose scheduled run time has arrived.
You do not manage individual jobs directly — you configure the RunTemplate schedule and the system handles the rest.
How Scheduling Works¶
The scheduler daemon wakes up every minute and scans active RunTemplates
For each RunTemplate where
next_run <= now(), it creates a newJobrecord in the databaseIt updates the RunTemplate’s
next_runto the next scheduled timeThe executor daemon picks up pending Job records and executes them
This means there is a small delay (up to ~1 minute) between a scheduled time and actual execution start.
Interval Reference¶
Interval |
Next run calculation |
Typical use case |
|---|---|---|
|
Never auto-scheduled |
On-demand / ad-hoc runs |
|
Top of the next hour |
Bank statement polling, health checks |
|
Same time the next day |
Daily reports, nightly imports |
|
Same day/time next week |
Weekly summaries |
|
Same date next month |
Monthly invoicing, period-end tasks |
|
Same date next year |
Annual reports, year-end closing |
Viewing the Job Schedule¶
Via the web interface:
The dashboard shows Upcoming Schedule — jobs planned for the near future
Company pages show per-company upcoming jobs
Via CLI:
# Show all pending (not yet executed) jobs
multiflexi-cli job list --status=pending
# Show next run times for all RunTemplates
multiflexi-cli runtemplate list
Pausing Scheduling¶
To stop a RunTemplate from generating new jobs without deleting it, set it to Inactive:
Via web: Open RunTemplate → click “Deactivate” (or toggle the Active switch)
Via CLI:
multiflexi-cli runtemplate update --id=42 --active=0
Resuming Scheduling¶
multiflexi-cli runtemplate update --id=42 --active=1
The scheduler will calculate the next run time from now and resume scheduling.
Triggering a Job Immediately¶
To run a job right now, outside of its normal schedule:
Via web: Open RunTemplate detail → click “▶️ Execute Now”
Via CLI:
multiflexi-cli runtemplate run --id=42
This creates a Job with status pending which the executor picks up within seconds.
Event-Driven Scheduling¶
In addition to time-based scheduling, MultiFlexi supports event-driven job triggering via the multiflexi-eventor (event processor) daemon. Jobs can be triggered by:
File system events (new file in a watched directory)
Webhook notifications
Message queue events
Event-driven RunTemplates use the Manually interval and are triggered exclusively by the event processor. See the event processor documentation for configuration details.
Monitoring Job Execution¶
After a job runs, its status appears in:
The Jobs view in the web interface (filter by company, application, status, date)
The Dashboard recent jobs widget
The Zabbix integration (if configured) — see Zabbix Integration
Job logs:
journalctl -u multiflexi-executor -f
See Also¶
Creating RunTemplates — Creating and configuring RunTemplates
Debugging Failed Jobs — What to do when a job fails
Execution Architecture — How scheduler and executor interact
Systemd Services — Managing the scheduler daemon