1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { msHour } from "https://esm.town/v/stevekrouse/msHour";
import { cron } from "https://esm.town/v/stevekrouse/cron";
import { range } from "https://esm.town/v/stevekrouse/range";
export const exampleCronDay = range(0, 24).map((hour) =>
cron({
expression: "0 9 * * *",
lastRunAt: new Date(
Date.now() + (hour - 1) * msHour
),
_debugNow: new Date(Date.now() + hour * msHour),
timezone: "America/New_York",
})
);
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023