Skip to content

feat(jobs): allow optional cron on job.yml for UTC schedules - #282

Merged
thsnkhn merged 2 commits into
hapyco:mainfrom
SaadNiaziDev:feature/studio-schedules-214
Sep 22, 2026
Merged

thsnkhn merged 2 commits into
hapyco:mainfrom
SaadNiaziDev:feature/studio-schedules-214

Conversation

@SaadNiaziDev

@SaadNiaziDev SaadNiaziDev commented Sep 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Adds optional cron on Job metadata (job.yml) for the common one-Job UTC schedule case
  • Validates cron expressions and persists job.cron during metadata sync
  • Materializes a file-backed Schedule from Job cron so the existing worker path runs it
  • Documents the shortcut and when to keep using _schedules.yml (non-UTC or multiple schedules)

Test plan

  • dygo db migrate with a Job that sets cron: "…" creates/updates the matching Schedule
  • Invalid Job cron fails metadata validation
  • Job without cron is unchanged; _schedules.yml schedules still work
  • dygo worker enqueues and runs the materialized Schedule occurrence
  • Confirm db/schema.sql and config/secrets/development.yml.age are not in this PR

Closes #214

SaadNiaziDev and others added 2 commits September 17, 2026 20:43
Add a Job cron shortcut that validates in metadata and materializes a
file-backed Schedule during migrate so simple one-job schedules do not
need a separate _schedules.yml entry.

Co-authored-by: Cursor <cursoragent@cursor.com>
@thsnkhn
thsnkhn merged commit 06bf905 into hapyco:main Sep 22, 2026
2 checks passed
@RanaOsamaAsif RanaOsamaAsif mentioned this pull request Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let Studio users schedule Jobs like "every Monday at 9 AM"

2 participants