←back to thread

setBigTimeout

(evanhahn.com)
210 points cfj | 2 comments | | HN request time: 0.001s | source
Show context
jackconsidine ◴[] No.41884139[source]
This type of thing is actually practical. Google Cloud Tasks have a max schedule date of 30 days in the future so the typical workaround is to chain tasks. As other commenters have suggested you can also set a cron check. This has more persistent implications on your database, but chaining tasks can fail in other ways, or explode if there are retries and a failed request does trigger a reschedule (I hate to say I’m speaking from experience)
replies(1): >>41884159 #
1. Waterluvian ◴[] No.41884159[source]
True. Though if you have a need to trigger something after that much time, you might recognize the need to track that scheduled event more carefully and want a scheduler. Then you’ve just got a loop checking the clock and your scheduled tasks.
replies(1): >>41884304 #
2. jackconsidine ◴[] No.41884304[source]
Right on. Pretty quickly that's the better solution