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 start time and end time.

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. You create a scheduled task that triggers the job to start on a daily basis. However, you define the end time of the scheduled task to be August 31. When the scheduled task starts running, it continues running until August 31, when it transitions to a finished state.

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. For example, the following image shows the configured start and end times for a scheduled task. The task has no defined start time and so starts running immediately after creation. The task has a defined end time of June 29, 2019.