pyams_scheduler.interfaces
package ⊞¶
-
class
pyams_scheduler.interfaces.
AfterRunJobEvent
(object, status)[source]¶ Bases:
zope.interface.interfaces.ObjectEvent
After run job event
-
class
pyams_scheduler.interfaces.
BeforeRunJobEvent
(object)[source]¶ Bases:
zope.interface.interfaces.ObjectEvent
Before run job event
-
interface
pyams_scheduler.interfaces.
IAfterRunJobEvent
[source]¶ Extends:
zope.interface.interfaces.IObjectEvent
Interface for events notified after a job is run
-
status
¶ Job execution status
-
-
interface
pyams_scheduler.interfaces.
IBaseTaskScheduling
[source]¶ Base interface for task scheduling info
-
active
¶ Active task
You can disable a task by selecting ‘No’
Implementation: zope.schema.Bool
Read Only: False Required: True Default Value: False Allowed Type: bool
-
start_date
¶ First execution date
Date from which scheduling should start
Implementation: zope.schema.Datetime
Read Only: False Required: False Default Value: None Allowed Type: datetime.datetime
-
-
interface
pyams_scheduler.interfaces.
IBeforeRunJobEvent
[source]¶ Extends:
zope.interface.interfaces.IObjectEvent
Interface for events notified before a job is run
-
interface
pyams_scheduler.interfaces.
ICronTaskScheduling
[source]¶ Extends:
pyams_scheduler.interfaces.IBaseTaskScheduling
Base interface for cron-style scheduled tasks
-
end_date
¶ Last execution date
Date past which scheduling should end
Implementation: zope.schema.Datetime
Read Only: False Required: False Default Value: None Allowed Type: datetime.datetime
-
year
¶ Years
Years for which to schedule the job
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: ‘*’ Allowed Type: str
-
month
¶ Months
Months (1-12) for which to schedule the job
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: ‘*’ Allowed Type: str
-
day
¶ Month days
Days (1-31) for which to schedule the job
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: ‘*’ Allowed Type: str
-
week
¶ Weeks
Year weeks (1-53) for which to schedule the job
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: ‘*’ Allowed Type: str
-
day_of_week
¶ Week days
Week days (0-6, with 0 as monday) for which to schedule the job
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: ‘*’ Allowed Type: str
-
hour
¶ Hours
Hours (0-23) for which to schedule the job
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: ‘*’ Allowed Type: str
-
minute
¶ Minutes
Minutes (0-59) for which to schedule the job
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: ‘*’ Allowed Type: str
-
second
¶ Seconds
Seconds (0-59) for which to schedule the job
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: ‘0’ Allowed Type: str
-
-
interface
pyams_scheduler.interfaces.
IDateTaskScheduling
[source]¶ Extends:
pyams_scheduler.interfaces.IBaseTaskScheduling
Base interface for date-style scheduled tasks
-
start_date
¶ Execution date
Date on which execution should start
Implementation: zope.schema.Datetime
Read Only: False Required: True Default Value: None Allowed Type: datetime.datetime
-
-
interface
pyams_scheduler.interfaces.
IJobInfo
[source]¶ Job interface
-
id
¶ Job ID
Implementation: zope.schema.TextLine
Read Only: False Required: True Default Value: None Allowed Type: str
-
next_run_time
¶ Job next run time
Implementation: zope.schema.Float
Read Only: False Required: True Default Value: None Allowed Type: float
-
job_state
¶ Job state
Implementation: zope.schema.Bytes
Read Only: False Required: True Default Value: None Allowed Type: bytes
-
-
interface
pyams_scheduler.interfaces.
ILoopTaskScheduling
[source]¶ Extends:
pyams_scheduler.interfaces.IBaseTaskScheduling
Base interface for loop-style scheduled tasks
-
end_date
¶ Last execution date
Date past which scheduling should end
Implementation: zope.schema.Datetime
Read Only: False Required: False Default Value: None Allowed Type: datetime.datetime
-
weeks
¶ Weeks interval
Number of weeks between executions
Implementation: zope.schema.Int
Read Only: False Required: True Default Value: 0 Allowed Type: int
-
days
¶ Days interval
Number of days between executions
Implementation: zope.schema.Int
Read Only: False Required: True Default Value: 0 Allowed Type: int
-
hours
¶ Hours interval
Number of hours between executions
Implementation: zope.schema.Int
Read Only: False Required: True Default Value: 0 Allowed Type: int
-
minutes
¶ Minutes interval
Number of minutes between executions
Implementation: zope.schema.Int
Read Only: False Required: True Default Value: 1 Allowed Type: int
-
seconds
¶ Seconds interval
Number of seconds between executions
Implementation: zope.schema.Int
Read Only: False Required: True Default Value: 0 Allowed Type: int
-
-
interface
pyams_scheduler.interfaces.
IScheduler
[source]¶ Extends:
zope.annotation.interfaces.IAttributeAnnotatable
Scheduler interface
-
__setitem__
(key, value)¶ Add the given object to the container under the given name.
Raises a
TypeError
if the key is not a unicode or ascii string.Raises a
ValueError
if the key is empty, or if the key contains a character which is not allowed in an object name.Raises a
KeyError
if the key violates a uniqueness constraint.The container might choose to add a different object than the one passed to this method.
If the object doesn’t implement IContained, then one of two things must be done:
- If the object implements ILocation, then the IContained interface must be declared for the object.
- Otherwise, a ContainedProxy is created for the object and stored.
The object’s __parent__ and __name__ attributes are set to the container and the given name.
If the old parent was
None
, then an IObjectAddedEvent is generated, otherwise, an IObjectMovedEvent is generated. An IContainerModifiedEvent is generated for the container.If the object replaces another object, then the old object is deleted before the new object is added, unless the container vetos the replacement by raising an exception.
If the object’s __parent__ and __name__ were already set to the container and the name, then no events are generated and no hooks. This allows advanced clients to take over event generation.
-
zodb_name
¶ ZODB connection name
Name of ZODB defining scheduler connection
Implementation: zope.schema.Choice
Read Only: False Required: False Default Value: ‘’
-
report_mailer
¶ Reports mailer
Mail delivery utility used to send mails
Implementation: zope.schema.Choice
Read Only: False Required: False Default Value: None
-
report_source
¶ Reports source
Mail address from which reports will be sent
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
internal_id
¶ Internal ID
-
get_socket
(self)¶ Get ZMQ socket matching scheduler utility
-
get_task
(self, task_id)¶ Get task matching given task ID
-
get_jobs
(self)¶ Get text output of running jobs
-
tasks
¶ Scheduler tasks
List of tasks assigned to this scheduler
Implementation: zope.schema.List
Read Only: False Required: False Default Value: None Allowed Type: list
-
history
¶ History
Task history
Implementation: zope.schema.List
Read Only: True Required: True Default Value: None Allowed Type: list
Value Type
Implementation: zope.schema.Object
Read Only: False Required: True Default Value: None Must Provide: pyams_scheduler.interfaces.ITaskHistory
-
-
interface
pyams_scheduler.interfaces.
ISchedulerProcess
[source]¶ Extends:
pyams_zmq.interfaces.IZMQProcess
Scheduler process marker interface
-
interface
pyams_scheduler.interfaces.
ITask
[source]¶ Extends:
pyams_scheduler.interfaces.ITaskInfo
,zope.annotation.interfaces.IAttributeAnnotatable
Complete task interface
-
settings_view_name
¶ Settings view name
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: ‘settings.html’ Allowed Type: str
-
history
¶ History
Task history
Implementation: zope.schema.List
Read Only: False Required: True Default Value: None Allowed Type: list
Value Type
Implementation: zope.schema.Object
Read Only: False Required: True Default Value: None Must Provide: pyams_scheduler.interfaces.ITaskHistory
-
runnable
¶ Is the task runnable ?
-
internal_id
¶ Internal ID
-
get_trigger
(self, registry)¶ Get scheduler job trigger
-
get_scheduling_info
(self, registry)¶ Get scheduling info
-
run
(self, report, **kw)¶ Launch job execution
-
store_report
(self, report, status)¶ Store execution report in task’s history and send it by mail
-
send_report
(self, report, status, target=None)¶ Store execution report in task’s history and send it by mail
-
reset
(self)¶ Re-schedule job execution
-
launch
(self)¶ Ask task for immediate execution
-
-
interface
pyams_scheduler.interfaces.
ITaskHistory
[source]¶ Scheduler task history item interface
-
__parent__
¶ Implementation: zope.schema.Field
Read Only: False Required: True Default Value: None
-
date
¶ Execution date
Implementation: zope.schema.Datetime
Read Only: False Required: True Default Value: None Allowed Type: datetime.datetime
-
status
¶ Execution status
Implementation: zope.schema.Choice
Read Only: False Required: True Default Value: None
-
report
¶ Execution report
Implementation: zope.schema.Text
Read Only: False Required: True Default Value: None Allowed Type: str
-
-
interface
pyams_scheduler.interfaces.
ITaskHistoryContainer
[source]¶ Task history container interface
-
__setitem__
(key, value)¶ Add the given object to the container under the given name.
Raises a
TypeError
if the key is not a unicode or ascii string.Raises a
ValueError
if the key is empty, or if the key contains a character which is not allowed in an object name.Raises a
KeyError
if the key violates a uniqueness constraint.The container might choose to add a different object than the one passed to this method.
If the object doesn’t implement IContained, then one of two things must be done:
- If the object implements ILocation, then the IContained interface must be declared for the object.
- Otherwise, a ContainedProxy is created for the object and stored.
The object’s __parent__ and __name__ attributes are set to the container and the given name.
If the old parent was
None
, then an IObjectAddedEvent is generated, otherwise, an IObjectMovedEvent is generated. An IContainerModifiedEvent is generated for the container.If the object replaces another object, then the old object is deleted before the new object is added, unless the container vetos the replacement by raising an exception.
If the object’s __parent__ and __name__ were already set to the container and the name, then no events are generated and no hooks. This allows advanced clients to take over event generation.
-
-
interface
pyams_scheduler.interfaces.
ITaskInfo
[source]¶ Scheduler task interface
-
__parent__
¶ Implementation: zope.schema.Field
Read Only: False Required: True Default Value: None
-
name
¶ Task name
Descriptive name given to this task
Implementation: zope.schema.TextLine
Read Only: False Required: True Default Value: None Allowed Type: str
-
schedule_mode
¶ Scheduling mode
Scheduling mode defines how task will be scheduled
Implementation: zope.schema.Choice
Read Only: False Required: True Default Value: None
-
report_target
¶ Reports target(s)
Mail address(es) to which execution reports will be sent; you can enter several addresses separated by semicolons
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
errors_target
¶ Errors reports target(s)
Mail address(es) to which error reports will be sent; you can enter several addresses separated by semicolons; keep empty to use normal reports target
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
report_errors_only
¶ Only report errors?
If ‘Yes’, only error reports will be sent to given errors target
Implementation: zope.schema.Bool
Read Only: False Required: True Default Value: False Allowed Type: bool
-
send_empty_reports
¶ Send empty reports?
If ‘No’, empty reports will not be sent by mail
Implementation: zope.schema.Bool
Read Only: False Required: True Default Value: False Allowed Type: bool
-
keep_empty_reports
¶ Keep empty reports history?
If ‘Yes’, empty reports will be kept in task history
Implementation: zope.schema.Bool
Read Only: False Required: True Default Value: False Allowed Type: bool
-
history_duration
¶ History duration
Number of days during which execution reports are kept in history; enter 0 to remove limit
Implementation: zope.schema.Int
Read Only: False Required: False Default Value: None Allowed Type: int
-
history_length
¶ History max length
Number of execution reports to keep in history; enter 0 to remove limit
Implementation: zope.schema.Int
Read Only: False Required: False Default Value: None Allowed Type: int
-
-
interface
pyams_scheduler.interfaces.
ITaskSchedulingMarker
[source]¶ Base interface for task scheduling mode markers
-
interface
pyams_scheduler.interfaces.
ITaskSchedulingMode
[source]¶ Scheduler task scheduling mode
-
marker_interface
¶ Class name of scheduling mode marker interface
-
schema
¶ Class name of scheduling mode info interface
-
get_trigger
(self, task)¶ Get trigger for the given task
-
schedule
(self, task, scheduler)¶ Add given task to the scheduler
-
pyams_scheduler.interfaces.ssh
¶
-
interface
pyams_scheduler.interfaces.ssh.
ISSHCallerTask
[source]¶ Extends:
pyams_scheduler.interfaces.ITask
,pyams_scheduler.interfaces.ssh.ISSHCallerTaskInfo
SSH caller interface
-
interface
pyams_scheduler.interfaces.ssh.
ISSHCallerTaskInfo
[source]¶ SSH caller task info
-
hostname
¶ Target hostname of IP address
Enter hostname or address of a remote hots; keep empty for local server host
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
port
¶ SSH port number
Implementation: zope.schema.Int
Read Only: False Required: False Default Value: 22 Allowed Type: int
-
username
¶ User name
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
private_key
¶ Private key filename
Enter name of private key file; use ‘~’ to identify running server user home directory, as in ~/.ssh/id_rsa
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
password
¶ Password
If not using private key, you must provide user’s password
Implementation: zope.schema.Password
Read Only: False Required: False Default Value: None Allowed Type: str
-
cmdline
¶ Command line
Enter command line, using absolute path names
Implementation: zope.schema.TextLine
Read Only: False Required: True Default Value: None Allowed Type: str
-
pyams_scheduler.interfaces.url
¶
-
interface
pyams_scheduler.interfaces.url.
IURLCallerTask
[source]¶ Extends:
pyams_scheduler.interfaces.ITask
,pyams_scheduler.interfaces.url.IURLCallerTaskInfo
URL caller interface
-
interface
pyams_scheduler.interfaces.url.
IURLCallerTaskInfo
[source]¶ URL caller task info
-
url
¶ Target URI
Full URI of remote service
Implementation: zope.schema.URI
Read Only: False Required: True Default Value: None Allowed Type: str
-
username
¶ User name
Target login
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
password
¶ Password
Target password
Implementation: zope.schema.Password
Read Only: False Required: False Default Value: None Allowed Type: str
-
proxy_server
¶ Proxy server
Proxy server name
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
proxy_port
¶ Proxy port
Proxy server port
Implementation: zope.schema.Int
Read Only: False Required: False Default Value: 8080 Allowed Type: int
-
remote_dns
¶ Use remote DNS ?
If ‘Yes’, remote DNS queries will be done by proxy server
Implementation: zope.schema.Bool
Read Only: False Required: True Default Value: True Allowed Type: bool
-
proxy_username
¶ Proxy user name
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
proxy_password
¶ Proxy password
Implementation: zope.schema.Password
Read Only: False Required: False Default Value: None Allowed Type: str
-
connection_timeout
¶ Connection timeout
Connection timeout, in seconds; keep empty to use system’s default, which is also none by default
Implementation: zope.schema.Int
Read Only: False Required: False Default Value: 30 Allowed Type: int
-
pyams_scheduler.interfaces.zodb
¶
-
interface
pyams_scheduler.interfaces.zodb.
IZODBPackingTask
[source]¶ Extends:
pyams_scheduler.interfaces.ITask
,pyams_scheduler.interfaces.zodb.IZODBPackingTaskInfo
ZODB packing task interface
-
interface
pyams_scheduler.interfaces.zodb.
IZODBPackingTaskInfo
[source]¶ ZODB packing task info
-
zeo_connection
¶ ZEO connection name
Name of ZEO connection utility pointing to packed database
Implementation: zope.schema.Choice
Read Only: False Required: True Default Value: None
-
pack_time
¶ Maximum transactions age
Transactions older than this age, in days, will be removed
Implementation: zope.schema.Int
Read Only: False Required: True Default Value: 0 Allowed Type: int
-