You can now attach schedules directly to your scheduled tasks. They sync when you run the dev or deploy commands.
More info here: https://trigger.dev/changelog/declarative-cron
And in the docs: https://trigger.dev/docs/v3/tasks-scheduled
import { logger, schedules } from "@trigger.dev/sdk/v3";
export const checkMetrics = schedules.task({
id: "check-metrics",
//6am every day
cron: "0 6 * * *",
run: async (payload) => {
const formattedTime = payload.timestamp.toLocaleString("en-US");
logger.log(formattedTime);
},
});Completed
π‘ Feature Request
Over 1 year ago
Linear
Get notified by email when there are changes.
Completed
π‘ Feature Request
Over 1 year ago
Linear
Get notified by email when there are changes.