import process from 'node:process' import { schedule } from '@stacksjs/scheduler' /** * **Scheduler** * * Define your scheduled tasks here. Jobs, actions, and shell commands * can all be scheduled with a fluent, expressive API. * * @see https://docs.stacksjs.com/scheduling */ export default function () { // Run the Inspire job every hour schedule .job('Inspire') .hourly() .setTimeZone('America/Los_Angeles') // Run a custom action every five minutes // schedule.action('CleanupTempFiles').everyFiveMinutes() // Run a shell command daily at midnight // schedule.command('echo "Daily maintenance complete"').daily() } process.on('SIGINT', () => { schedule.gracefulShutdown().then(() => process.exit(0)) })