Skip to content

Commit 0da9b50

Browse files
committed
Correct date syntax
1 parent ad8f5b3 commit 0da9b50

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

website/workers/app.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default {
6565
)
6666
)
6767
.orderBy(asc(sql`date(timestamp)`))
68-
.limit(99) // Limit to 99 days which is the limit of the workflow instances
68+
.limit(100) // Limit to 100 days which is the limit of the number of workflow instances you can create in a batch
6969
.catch((error) => {
7070
throw new Error("Failed to get dates", { cause: error });
7171
});
@@ -386,7 +386,7 @@ export class OvernightSaveToR2 extends WorkflowEntrypoint<
386386
async run(event: WorkflowEvent<OvernightSaveToR2Params>, step: WorkflowStep) {
387387
// Can access bindings on `this.env`
388388
// Can access params on `event.payload`
389-
const firstStep = await step.do(
389+
await step.do(
390390
"Download data, and upload to R2",
391391
{
392392
retries: {
@@ -406,7 +406,7 @@ export class OvernightSaveToR2 extends WorkflowEntrypoint<
406406
const startOfPeriod = new Date(
407407
dayToProcess.getFullYear(),
408408
dayToProcess.getMonth(),
409-
dayToProcess.getDate() - 1,
409+
dayToProcess.getDate(),
410410
0,
411411
0,
412412
0,
@@ -415,7 +415,7 @@ export class OvernightSaveToR2 extends WorkflowEntrypoint<
415415
const endOfPeriod = new Date(
416416
dayToProcess.getFullYear(),
417417
dayToProcess.getMonth(),
418-
dayToProcess.getDate(),
418+
dayToProcess.getDate() + 1,
419419
0,
420420
0,
421421
0,

website/wrangler.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
},
7373
"preview_urls": false,
7474
"triggers": {
75-
"crons": ["30 2 * * *"] // every day at 2:30 AM UTC
75+
"crons": ["07 11 * * *"] // every day at 11:07 AM UTC
7676
},
7777
"version_metadata": {
7878
"binding": "CF_VERSION_METADATA"

0 commit comments

Comments
 (0)