Skip to main content

Cron entries

Two cron entries ship with the add-on, both registered at AdminCP > Tools > Cron entries. Both gate on Enable evaluator; with the master switch off, neither does anything.

EntryScheduleWhat it does
MC Sunset: Evaluate inactive usersLast day of every month at 03:30Queues one EvaluateUsers job that scores candidates and enqueues a TransitionUser job per member whose target tier differs from their current tier. Also recovers stuck TransitionUser jobs left behind by a dead worker.
MC Sunset: retention enforcerSundays at 04:15Queues one EnforceRetention job that walks three steps: snapshot purge (expired snapshots deleted, one audit row each), released-tier sweep (hard-tier members past the Hard to released window get queued for transition unless Confirm username releases manually is on), audit-log prune (audit rows past the audit-log retention window deleted in 1000-row chunks).

Schedule semantics

The evaluator cron entry fires monthly on the boundary day at 03:30. The Evaluator schedule option (Daily / Weekly) is layered on top: the entry's run method returns immediately if the schedule says "weekly" and the day is not Monday. Adjust the cron entry directly if you want a different cadence; the entry will still honour the schedule option as a secondary gate.

Batch size and time bound

The evaluator processes up to Maximum members per run candidates per pass and pages by user_id. It returns control to the job runner when either the batch is exhausted or the job runner's time limit is approaching (defaults to two seconds). The next pass resumes from the saved cursor automatically.

The retention enforcer's snapshot and release steps process up to 200 and 100 rows per pass respectively. The audit prune does up to 1000 rows per pass. All three steps are paginated and resume across job runs.

Stuck job recovery

TransitionUser jobs occasionally die mid-execution (worker timeout, server restart). On every evaluator pass, the cron looks for any xf_job row whose unique_key starts with mcSunsetTransition- and whose trigger_date is older than five minutes. Each stuck row is deleted and re-enqueued with force=true so the transition is attempted again. Sunsetter::transition is idempotent, so re-running on a since-completed transition is a harmless no-op.

Disabling temporarily

The cleanest way to pause both crons is to turn Enable evaluator off in the options. Both entries continue to fire but return immediately. Disabling the cron entries themselves at AdminCP > Tools > Cron entries also works but leaves the option in an inconsistent state for the next admin.