Class CronJob

  • All Implemented Interfaces:
    IApiEndpoint, IApiResource, INetworkPolicyPeer, IPodSelector, IResource, ISubject, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

    @Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
               date="2023-07-08T00:25:14.107Z")
    @Stability(Stable)
    public class CronJob
    extends Workload
    A CronJob is responsible for creating a Job and scheduling it based on provided cron schedule.

    This helps running Jobs in a recurring manner.

    • Constructor Detail

      • CronJob

        protected CronJob​(software.amazon.jsii.JsiiObjectRef objRef)
      • CronJob

        protected CronJob​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
      • CronJob

        @Stability(Stable)
        public CronJob​(@NotNull
                       software.constructs.Construct scope,
                       @NotNull
                       String id,
                       @NotNull
                       CronJobProps props)
        Parameters:
        scope - This parameter is required.
        id - This parameter is required.
        props - This parameter is required.
    • Method Detail

      • getConcurrencyPolicy

        @Stability(Stable)
        @NotNull
        public String getConcurrencyPolicy()
        The policy used by this cron job to determine the concurrency mode in which to schedule jobs.
      • getFailedJobsRetained

        @Stability(Stable)
        @NotNull
        public Number getFailedJobsRetained()
        The number of failed jobs retained by this cron job.
      • getSchedule

        @Stability(Stable)
        @NotNull
        public org.cdk8s.Cron getSchedule()
        The schedule this cron job is scheduled to run in.
      • getStartingDeadline

        @Stability(Stable)
        @NotNull
        public org.cdk8s.Duration getStartingDeadline()
        The time by which the running cron job needs to schedule the next job execution.

        The job is considered as failed if it misses this deadline.

      • getSuccessfulJobsRetained

        @Stability(Stable)
        @NotNull
        public Number getSuccessfulJobsRetained()
        The number of successful jobs retained by this cron job.
      • getSuspend

        @Stability(Stable)
        @NotNull
        public Boolean getSuspend()
        Whether or not the cron job is currently suspended or not.
      • getTimeZone

        @Stability(Stable)
        @Nullable
        public String getTimeZone()
        The timezone which this cron job would follow to schedule jobs.