1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest.serialization import Model
class Schedule(Model):
"""The schedule according to which jobs will be created.
:param do_not_run_until: The earliest time at which any job may be created
under this job schedule. If you do not specify a doNotRunUntil time, the
schedule becomes ready to create jobs immediately.
:type do_not_run_until: datetime
:param do_not_run_after: A time after which no job will be created under
this job schedule. The schedule will move to the completed state as soon
as this deadline is past and there is no active job under this job
schedule. If you do not specify a doNotRunAfter time, and you are creating
a recurring job schedule, the job schedule will remain active until you
explicitly terminate it.
:type do_not_run_after: datetime
:param start_window: The time interval, starting from the time at which
the schedule indicates a job should be created, within which a job must be
created. If a job is not created within the startWindow interval, then the
'opportunity' is lost; no job will be created until the next recurrence of
the schedule. If the schedule is recurring, and the startWindow is longer
than the recurrence interval, then this is equivalent to an infinite
startWindow, because the job that is 'due' in one recurrenceInterval is
not carried forward into the next recurrence interval. The default is
infinite. The minimum value is 1 minute. If you specify a lower value, the
Batch service rejects the schedule with an error; if you are calling the
REST API directly, the HTTP status code is 400 (Bad Request).
:type start_window: timedelta
:param recurrence_interval: The time interval between the start times of
two successive jobs under the job schedule. A job schedule can have at
most one active job under it at any given time. Because a job schedule can
have at most one active job under it at any given time, if it is time to
create a new job under a job schedule, but the previous job is still
running, the Batch service will not create the new job until the previous
job finishes. If the previous job does not finish within the startWindow
period of the new recurrenceInterval, then no new job will be scheduled
for that interval. For recurring jobs, you should normally specify a
jobManagerTask in the jobSpecification. If you do not use jobManagerTask,
you will need an external process to monitor when jobs are created, add
tasks to the jobs and terminate the jobs ready for the next recurrence.
The default is that the schedule does not recur: one job is created,
within the startWindow after the doNotRunUntil time, and the schedule is
complete as soon as that job finishes. The minimum value is 1 minute. If
you specify a lower value, the Batch service rejects the schedule with an
error; if you are calling the REST API directly, the HTTP status code is
400 (Bad Request).
:type recurrence_interval: timedelta
"""
_attribute_map = {
'do_not_run_until': {'key': 'doNotRunUntil', 'type': 'iso-8601'},
'do_not_run_after': {'key': 'doNotRunAfter', 'type': 'iso-8601'},
'start_window': {'key': 'startWindow', 'type': 'duration'},
'recurrence_interval': {'key': 'recurrenceInterval', 'type': 'duration'},
}
def __init__(self, **kwargs):
super(Schedule, self).__init__(**kwargs)
self.do_not_run_until = kwargs.get('do_not_run_until', None)
self.do_not_run_after = kwargs.get('do_not_run_after', None)
self.start_window = kwargs.get('start_window', None)
self.recurrence_interval = kwargs.get('recurrence_interval', None)
|