Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

aminebenj's avatar

Cron in Vapor

Hi all, I have some Tasks that have to be schudeled every min. I dont find anything about cron in Vapor doc. (I know that forge manage crons)

Anyone can give me a method to schudle a task every min using Vapor?

Thank you

0 likes
3 replies
bobbybouwmann's avatar
Level 88

So you don't have to configure anything for this. Whenever you deploy your application it will scan the scheduler class and create an AWS cloudwatch rule for every task. So it basically creates a cronjob for each of them automatically for you.

Like everything else, Vapor takes care of it for you ;)

aminebenj's avatar

Thak you :) It magic, Is there any limitation beside the 15mins runtime of lambdas?

willvincent's avatar

Normal cloudwatch event limits would apply... probably the most relevant one would be the limit of 100 rules per region per account. That's a soft limit though, you can request an increase if necessary.

That's still probably way more scheduled events than most people will have

See: Cloudwatch Event Limits

Please or to participate in this conversation.