Background tasks & cron actions

Two related pages under System: Background Tasks shows jobs the system queues for itself (rerating, invoice generation, CDR export); Cron Actions is where an operator schedules recurring tariff, routing and invoicing jobs.

Background Tasks

In the sidebar, go to System > Background Tasks. Each row is one queued or finished job, with its status and completion percentage.

Background Tasks: an empty queue on this test system.
ColumnMeaning
TypeWhat the task does — rerating a batch of calls, generating invoices, exporting CDR data, and similar jobs triggered elsewhere in the product.
StatusWaiting, In progress, Done or Failed.
%Progress, where the task reports one.
Created / completedWhen the task was queued, and when it finished.

The page's own note is worth repeating: "In the legacy system the tasks are executed by shell workers. In the new system 'Restart' re-queues the task; the background worker will be connected separately." — a row's Restart button puts it back in the queue; the worker that executes it runs independently.

Cron Actions

In the sidebar, go to System > Cron Actions. These are recurring jobs an operator sets up: scheduled tariff, provider-tariff and LCR changes, plus invoice generation and statement-of-account e-mail dispatch.

Cron Actions: none configured on this test system.

New cron action opens a form for one job. The exact fields depend on the chosen Action; for Generate invoice it also asks which billing period the invoice covers and whether to e-mail it as a PDF once generated.

New cron action: here, a one-time "Generate invoice" job for all postpaid users.
FieldMeaning
ActionWhat to run: change tariff, change provider tariff, change LCR (admin only), generate invoices, or send a statement of account.
PeriodicityOne time, daily, weekly, monthly, yearly, workdays only, free days only, every N months, or a dynamic N-day interval.
PriorityHigh, Medium or Low — how this job is prioritised against others when the cron daemon runs it.
Valid from / Valid untilThe window this schedule is active in.
Invoices forFor "Generate invoice": all postpaid users, all prepaid users, or one specific user.
Period from/until (day), Issue dayWhich days of the month the generated invoice covers, and which day it is issued on.
Email invoices after generationSend each generated invoice by e-mail as a PDF attachment.

Back on the list, Next run shows when a cron action will next fire, in the operator's local time.

Warning

A "Generate invoice" cron action is a real, automatic invoicing job once saved — it will run unattended on its schedule. This wiki only opened the empty New cron action form to show its fields; nothing here was saved.

Check

Open Cron Actions and confirm Next run shows the time you expect, in your own local time zone; open Background Tasks after a large operation (like a rerate) to watch it move from Waiting to Done.