nitro icon indicating copy to clipboard operation
nitro copied to clipboard

feat(tasks): one-time tasks

Open schplitt opened this issue 11 months ago โ€ข 0 comments

๐Ÿ”— Linked issue

โ“ Type of change

  • [ ] ๐Ÿ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • [ ] ๐Ÿž Bug fix (a non-breaking change that fixes an issue)
  • [ ] ๐Ÿ‘Œ Enhancement (improving an existing functionality like performance)
  • [x] โœจ New feature (a non-breaking change that adds functionality)
  • [ ] ๐Ÿงน Chore (updates to the build process or auxiliary tools and libraries)
  • [ ] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to change)

๐Ÿ“š Description

๐Ÿ“ Checklist

  • [x] I have linked an issue or discussion.
  • [x] I have updated the documentation accordingly.

Implements scheduled one time tasks for #1974

Croner only ever runs on full seconds, so the actual wait time may be slightly after the specified time.
I added a test that runs a scheduled task. Sadly, I didn't find a way to use Vitest's mock timers to artificially advance the Cron job.

schplitt avatar Mar 20 '25 19:03 schplitt