Scheduled events¶
Operator overview of recurring work on a KCWorks instance: Celery beat
tasks (CELERY_BEAT_SCHEDULE) and invenio-jobs Job rows (registered by
setup-services.sh / setup-services-production.sh). All clock times below
are UTC.
This page is a snapshot of defaults from configuration and setup scripts. Live
Job schedules can differ if someone changed them in the admin UI or with
invenio kcworks-jobs upsert.
Two schedulers¶
Process |
Compose service |
What it fires |
|---|---|---|
Celery beat (default scheduler) |
|
Entries in |
|
|
Active |
Both must be running for a full instance. Job upserts alone do nothing without
the scheduler service; beat tasks alone do nothing without a worker that
runs --beat (or a separate beat process using the default scheduler).
Sources of truth
Beat:
invenio_app_rdm.config.CELERY_BEAT_SCHEDULE(package default; KCWorks does not replace the dict ininvenio.cfg), plusCOMMUNITY_STATS_CELERYBEAT_*merged at app init whenCOMMUNITY_STATS_SCHEDULED_AGG_TASKS_ENABLED/COMMUNITY_STATS_SCHEDULED_CACHE_TASKS_ENABLEDare true (both are ininvenio.cfg).Jobs:
scripts/setup-services.shandscripts/setup-services-production.sh.
Celery crontab day_of_week: 0 = Sunday … 6 = Saturday.
Related detail pages: Vocabulary management, Names vocabulary, Stats (developing), Installation — job registration.
Within each hour¶
Ordered by minute. Interval tasks that are not minute-aligned are listed under Interval.
When (UTC) |
Kind |
Id |
What |
Configured in |
|---|---|---|---|---|
|
beat |
|
Aggregate raw stats events |
|
|
beat |
|
Reindex records whose stats changed |
|
|
beat |
|
Process queued stats events into indices |
|
|
beat |
|
Community / dashboard aggregations |
|
|
beat |
|
Pre-generate stats dashboard cache |
|
Also every hour (see Interval): file checksum scheduling, collections size update, and several account/draft cleanups on hourly (or longer) intervals.
Daily (UTC)¶
When (UTC) |
Kind |
Id |
What |
Configured in |
|---|---|---|---|---|
00:02 |
beat |
|
Lift expired embargos |
|
00:03 |
beat |
|
Expire overdue requests |
|
00:04 |
beat |
|
Remove expired access-request tokens |
|
00:05 |
beat |
|
Prune old invenio-jobs logs |
|
01:00 |
beat |
|
Clear communities cache that may never expire otherwise |
|
02:00 |
beat |
|
Refresh sitemap cache |
|
07:00 |
beat |
|
Email report of unhealthy / missing files |
|
Weekly¶
When (UTC) |
Kind |
Id |
What |
Configured in |
|---|---|---|---|---|
Wed 02:00 |
job |
|
Download OCLC FAST |
|
Sun 03:00 |
job |
|
Load ROR funders dump |
|
Sun 04:00 |
job |
|
Load ROR affiliations dump |
|
Sun 05:00 |
job |
|
Import awards from OpenAIRE |
|
Sun 06:00 |
job |
|
Enrich existing EC awards from CORDIS (no inserts) |
|
Sun 07:00 |
job |
|
Auto-merge safe ORCID-sharing Names pairs |
|
Sun 08:00 |
job |
|
Soft-duplicate Names scan for review |
|
Sun 09:00 |
job |
|
Backfill missing USER Names rows |
|
Sunday vocabulary jobs are staggered by an hour so heavy Zenodo pulls and index writes do not overlap. CORDIS runs after OpenAIRE because it only updates existing award records. Names jobs follow the ROR/awards window. FAST runs mid-week early morning so it does not share the Sunday cascade.
On Sundays at 07:00 the Names ORCID merge and the daily file-integrity report can fire in the same hour; they use different queues/tasks but share worker capacity.
Interval (not clock-tied)¶
These fire on a timedelta from last run (or beat startup), not a fixed hour:minute.
Interval |
Kind |
Id |
What |
Configured in |
|---|---|---|---|---|
every 10s |
beat |
|
Drain indexer queues |
|
every 1h |
beat |
|
Clean session table |
|
every 1h |
beat |
|
Cleanup expired drafts |
|
every 1h |
beat |
|
Schedule file checksum verification batches |
|
every 1h |
beat |
|
Refresh collection size metrics |
|
every 4h |
beat |
|
Refresh account domain status |
|
every 6h |
beat |
|
Delete stale IP entries |
|
Changing schedules¶
Jobs:
invenio kcworks-jobs upsert <job_id> --schedule "crontab:…" …(see CLI). Re-running setup scripts upserts the documented defaults again.Beat: override or extend
CELERY_BEAT_SCHEDULEininvenio.cfg(merge carefully; prefer additive changes). Community stats hourly tasks can be disabled withCOMMUNITY_STATS_SCHEDULED_AGG_TASKS_ENABLED/COMMUNITY_STATS_SCHEDULED_CACHE_TASKS_ENABLED.