Class CronHelper
java.lang.Object
software.amazon.cloudformation.scheduler.CronHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateOneTimeCronExpression(int minutesFromNow) Schedule a re-invocation of the executing handler no less than 1 minute from now /** Creates a cron(..) expression for a single instance at Now+minutesFromNow NOTE: CloudWatchEvents only support a 1minute granularity for re-invoke Anything less should be handled inside the original handler request Expression is of form cron(minutes, hours, day-of-month, month, day-of-year, year) where day-of-year is not necessary when the day-of-month and month-of-year fields are supplied
-
Constructor Details
-
CronHelper
public CronHelper() -
CronHelper
This .ctor provided for testing- Parameters:
clock- current clock system usuallyClock.systemUTC()
-
-
Method Details
-
generateOneTimeCronExpression
Schedule a re-invocation of the executing handler no less than 1 minute from now /** Creates a cron(..) expression for a single instance at Now+minutesFromNow NOTE: CloudWatchEvents only support a 1minute granularity for re-invoke Anything less should be handled inside the original handler request Expression is of form cron(minutes, hours, day-of-month, month, day-of-year, year) where day-of-year is not necessary when the day-of-month and month-of-year fields are supplied- Parameters:
minutesFromNow- The number of minutes from now for building the cron expression- Returns:
- A cron expression for use with CloudWatchEvents putRule(..) API
-