Start and End Times

A scheduled task is a long-running task that by default starts running immediately after you create it and continues running indefinitely. You can optionally determine how long a scheduled task runs by defining a schedule start time and end time.

A schedule start or end time is a future date when you want a scheduled task to start or end. By default, the start or end time is at 12:00 AM on the specified date in the time zone specified for the task. You can optionally include an alternative time on that date for the scheduled task to start or end.

For example, you might define several scheduled tasks to run batch jobs in your production environment. However, since your production environment isn't yet live, you don't want the tasks to begin running immediately. So you define their start time to be the end of the month when you plan for the production system to be live.

Or, you might have a batch job that needs to run daily only during the summer months in 2020. You create a scheduled task that triggers the job to start on a daily basis. You define the start time of the scheduled task as June 1, 2020 and the end time of the scheduled task to be August 31, 2020 at 11:59 PM. The scheduled task starts running on June 1, 2020 at 12:00 AM, and it continues running until 11:59 PM on August 31, when it transitions to a finished state.

Important: Set tasks to start before the event that triggers the action. For example, if a task starts a batch job in the morning at 6:00 AM, then set the start time for that task to be at least 05:59 AM.

When a scheduled task transitions to a finished state based on the configured end time, it ends permanently and cannot be restarted. If you do not define an end time, you can force a scheduled task to end permanently by killing the task. For a description of each status, see Scheduled Task Status.

Define start and end times in the UI when you create or edit a scheduled task. Remember that the time zone specified for the task applies to the start time and end time. For example, the following image shows the configured start and end times for a scheduled task. The task specifies the US/Central time zone. The task has no defined start time and so starts running immediately after creation. The task has a defined end time of October 29, 2020. Therefore, the task stops running at 12:00 AM in the US/Central time zone on October 29, 2020.