flexget.components.scheduler.api module#

class flexget.components.scheduler.api.ObjectsContainer[source]#

Bases: object

schedule_object = {'additionalProperties': False, 'description': 'A schedule which runs specified tasks periodically', 'error_maxProperties': 'Either `cron` or `interval` must be defined.', 'error_minProperties': 'Either `cron` or `interval` must be defined.', 'maxProperties': 3, 'minProperties': 2, 'properties': {'id': {'type': 'integer'}, 'interval': {'additionalProperties': False, 'anyOf': [{'required': ['minutes']}, {'required': ['hours']}, {'required': ['days']}, {'required': ['weeks']}], 'error_anyOf': 'Interval must be specified as one or more of minutes, hours, days, weeks', 'properties': {'days': {'type': 'number'}, 'hours': {'type': 'number'}, 'jitter': {'type': 'integer'}, 'minutes': {'type': 'number'}, 'weeks': {'type': 'number'}}, 'title': 'Simple Interval', 'type': 'object'}, 'schedule': {'additionalProperties': False, 'properties': {'day': {'type': ['integer', 'string']}, 'day_of_week': {'type': ['integer', 'string']}, 'hour': {'type': ['integer', 'string']}, 'jitter': {'type': 'integer'}, 'minute': {'type': ['integer', 'string']}, 'month': {'type': ['integer', 'string']}, 'week': {'type': ['integer', 'string']}, 'year': {'type': ['integer', 'string']}}, 'title': 'Advanced Cron Interval', 'type': 'object'}, 'tasks': {'oneOf': [{'items': {'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': False}, {'title': 'single value', 'type': 'string'}]}}, 'required': ['tasks'], 'title': 'schedule', 'type': 'object'}#
schedules_list = {'items': {'additionalProperties': False, 'description': 'A schedule which runs specified tasks periodically', 'error_maxProperties': 'Either `cron` or `interval` must be defined.', 'error_minProperties': 'Either `cron` or `interval` must be defined.', 'maxProperties': 3, 'minProperties': 2, 'properties': {'id': {'type': 'integer'}, 'interval': {'additionalProperties': False, 'anyOf': [{'required': ['minutes']}, {'required': ['hours']}, {'required': ['days']}, {'required': ['weeks']}], 'error_anyOf': 'Interval must be specified as one or more of minutes, hours, days, weeks', 'properties': {'days': {'type': 'number'}, 'hours': {'type': 'number'}, 'jitter': {'type': 'integer'}, 'minutes': {'type': 'number'}, 'weeks': {'type': 'number'}}, 'title': 'Simple Interval', 'type': 'object'}, 'schedule': {'additionalProperties': False, 'properties': {'day': {'type': ['integer', 'string']}, 'day_of_week': {'type': ['integer', 'string']}, 'hour': {'type': ['integer', 'string']}, 'jitter': {'type': 'integer'}, 'minute': {'type': ['integer', 'string']}, 'month': {'type': ['integer', 'string']}, 'week': {'type': ['integer', 'string']}, 'year': {'type': ['integer', 'string']}}, 'title': 'Advanced Cron Interval', 'type': 'object'}, 'tasks': {'oneOf': [{'items': {'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': False}, {'title': 'single value', 'type': 'string'}]}}, 'required': ['tasks'], 'title': 'schedule', 'type': 'object'}, 'type': 'array'}#
class flexget.components.scheduler.api.ScheduleAPI(api, *args, **kwargs)[source]#

Bases: APIResource

Parameters:

api (RestxAPI)

_update_schedule(existing, update, merge=False)[source]#
delete(schedule_id, session=None)[source]#

Delete a schedule.

get(schedule_id, session=None)[source]#

Get schedule details.

mediatypes()#
put(schedule_id, session=None)[source]#

Update schedule.

endpoint = 'schedules_schedule_api'#
methods: ClassVar[Collection[str] | None] = {'DELETE', 'GET', 'PUT'}#

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

class flexget.components.scheduler.api.SchedulesAPI(api, *args, **kwargs)[source]#

Bases: APIResource

Parameters:

api (RestxAPI)

get(session=None)[source]#

List schedules.

mediatypes()#
post(session=None)[source]#

Add new schedule.

endpoint = 'schedules_schedules_api'#
methods: ClassVar[Collection[str] | None] = {'GET', 'POST'}#

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

flexget.components.scheduler.api._schedule_by_id(schedule_id, schedules)[source]#