Mosce ERP · Help Center
Accounting

Recurring templates

Schedule accounting transactions so they post automatically on a fixed cadence - rents, salaries, manual depreciation, and the like.

A recurring template links a journal entry template to a schedule. Every time the period is due, Mosce ERP materializes a new journal entry from the template and advances to the next period.

Reading time: ~6 min

When to use this

Use Recurring transactions for journal entries that repeat regularly: monthly rents, insurance premiums, annual license payments, quarterly accruals, fixed salaries. Any journal entry where the accounts and amounts are stable over time is a candidate.

For depreciation of fixed assets, do not use recurring templates - that module has its own scheduled task.

Before you start

  • You need the recurring-template:manage permission to create and edit, and recurring-template:run to run manually. recurring-template:read to view.
  • A journal entry template must exist with the accounts and variables already defined. The recurring template references it and passes values to its variables.

Step by step

  1. Go to Recurring Transactions from the accounting menu.

  2. Press New template. Complete:

    • Name (required) - e.g. Main office rent.
    • Description (optional).
    • Journal entry template (required) - selector that loads the existing templates and shows their variables.
    • Variables - for each {{variable}} defined in the template, enter the value to be used (it can be an amount, an account, a text). These values are the defaults applied on each run.
    • Cadence (required) - Daily, Weekly, Monthly, Quarterly, or Annual.
    • Interval (optional, 1 - 12, default 1) - combined with the cadence. E.g. Monthly + interval 2 = every 2 months.
    • Start date (required) - the first execution.
    • End date (optional) - last execution inclusive. If not specified, it runs indefinitely.
    • Posting mode (optional, default Post automatically):
      • Post automatically - the generated journal entry is created with POSTED status and enters the general ledger immediately.
      • Draft only - the journal entry stays in DRAFT so someone can review it and post it by hand.
    • Note (optional) - memo applied to each generated journal entry.
  3. Press Create. The template is born in Active state and its next execution (nextRunAt) is set to the start date.

How it runs

A scheduled task sweeps every day through the active templates whose nextRunAt has already passed. For each one:

  • It loads the current variables and materializes a journal entry from the underlying journal entry template.
  • If the mode is AUTO_POST, it posts the journal entry; if it is DRAFT_ONLY, it leaves it in draft.
  • It records a run (RecurringRun) with the result: Successful, Failed, Skipped (period blocked), Skipped (no period), or Skipped (paused).
  • It advances nextRunAt to the next period.

Each run is idempotent per period: if for any reason the sweep repeats, the system blocks the double posting with the unique combination (template, scheduledPeriod).

Run now

If you need to bring a run forward, open the detail and press Run now. The dialog shows you the scheduled period and the current variables; you must check the confirmation box and accept. The system uses the current scheduledFor to preserve idempotency - if it already ran that period, it warns you that a duplicate exists.

Pause, resume, finish

  • Pause: stops automatic executions but does not move nextRunAt. Useful if you go on vacation or want to freeze it temporarily.
  • Resume: if you resume after the scheduled date, Mosce ERP recalculates nextRunAt to the maximum of now and the original - this way all missed periods are not posted retroactively.
  • Finish: terminal, irreversible state. The template becomes Finished and never runs again.

Expected result

In the template detail you can see:

  • Summary - cadence, next execution, last execution, status, posting mode.
  • Execution history - one row per run with its period, execution date, status, and link to the generated journal entry (if applicable).
  • Preview - how the next journal entry would look if it ran now with the current variables.

Common errors

  • The variables do not appear in the form - the underlying journal entry template has no variables defined or has not loaded yet. Wait for the "Loading variables..." message or check the journal entry template.
  • The cadence cannot be changed - once the template has its first successful run, the cadence, interval, and start date fields are locked to preserve the historical schedule. Only name, description, variables, end date, mode, and memo remain editable.
  • Skipped (period blocked) - the fiscal period for that date is closed. Open the period if applicable.
  • Skipped (no period) - there is no fiscal period covering the scheduled date.
  • The generated journal entry came out in draft - the template is in DRAFT_ONLY mode. Change it to AUTO_POST if you want immediate posting.