Skip to content

Scheduler

flowtask.scheduler

DataIntegration Scheduler.


Scheduler is a APScheduler-powered tool for scheduling tasks.

NavScheduler

NavScheduler(event_loop=None)

NavScheduler.

Demonstrates how to use the asyncio compatible scheduler to schedule jobs.

add_job async

add_job(job)

add_job.

Add a Job to the Scheduler.

fix_job_schedule

fix_job_schedule(job, job_id)

fix_job_schedule.

Return a re-scheduled Job to cuirrent schedule.

Parameters:

Name Type Description Default
job Job

instance of APScheduler Job.

required
job_id str

ID of the job

required

get_cron_strings

get_cron_strings(expression)

Returns cron strings. :param dict expression: an array of cron structures. :return: cron strings :rtype: dict

get_hostname

get_hostname()

Returns the host name.

get_pid

get_pid()

Returns the process ID

get_stacktrace

get_stacktrace()

Returns the full stack trace.

job_status

job_status(event)

React on Error events from scheduler.

:param apscheduler.events.JobExecutionEvent event: job execution event.

TODO: add the reschedule_job scheduler = sched.scheduler #it returns the native apscheduler instance scheduler.reschedule_job('my_job_id', trigger='cron', minute='*/5')

job_success

job_success(event)

Job Success.

Event when a Job was executed successfully.

:param apscheduler.events.JobExecutionEvent event: job execution event

periodic_lock_check async

periodic_lock_check(app)

Periodically checks if the lock is available, attempting to acquire if not held.

set_workers

set_workers()

Create the instance of Queue Workers.

startup async

startup(app, conn)

Scheduler Startup.

functions

TaskScheduler

TaskScheduler(program, task, job_id, priority='low', worker=None, **kwargs)

import_from_path

import_from_path(path)

Import a module / class from a path string. :param str path: class path, e.g., ndscheduler.corescheduler.job :return: class object :rtype: class

handlers

Handler for managing DataIntegration Scheduler.

JobManager

Bases: ModelView

SchedulerManager

Bases: BaseView

Scheduler Manager Facility.

get: getting Scheduler and Jobs information, for Jobs or a single job post: editing existing jobs put: inserting a new task into the jobstore delete: removing (or pausing) some jobs from the scheduler patch: reload all jobs.

manager

Scheduler Manager.

API View for Managing the Scheduler.

JobManager

Bases: ModelView

SchedulerManager

Bases: BaseView

Scheduler Manager Facility.

get: getting Scheduler and Jobs information, for Jobs or a single job post: editing existing jobs put: inserting a new task into the jobstore delete: removing (or pausing) some jobs from the scheduler patch: reload all jobs.

service

Scheduler Service.

API View for Managing Jobs in NAV Scheduler.

SchedulerService

Bases: BaseView

Scheduler Manager Facility.

Facility for a remotely accessible Scheduler Service. can add, modify, remove, pause or re-schedule jobs, looking for job information, etc.

TODO: Can we use it also as RPC Service.

get: Get all information about a Job. put: inserting a new Job into the jobstore. post: modify a Job or re-schedule a Job. delete: removing (or pausing) a Job. patch: restart a Job o submitting a Job.

scheduler

NavScheduler.

Job for attaching tasks to the Scheduler.

NavScheduler

NavScheduler(event_loop=None)

NavScheduler.

Demonstrates how to use the asyncio compatible scheduler to schedule jobs.

add_job async
add_job(job)

add_job.

Add a Job to the Scheduler.

fix_job_schedule
fix_job_schedule(job, job_id)

fix_job_schedule.

Return a re-scheduled Job to cuirrent schedule.

Parameters:

Name Type Description Default
job Job

instance of APScheduler Job.

required
job_id str

ID of the job

required
get_cron_strings
get_cron_strings(expression)

Returns cron strings. :param dict expression: an array of cron structures. :return: cron strings :rtype: dict

get_hostname
get_hostname()

Returns the host name.

get_pid
get_pid()

Returns the process ID

get_stacktrace
get_stacktrace()

Returns the full stack trace.

job_status
job_status(event)

React on Error events from scheduler.

:param apscheduler.events.JobExecutionEvent event: job execution event.

TODO: add the reschedule_job scheduler = sched.scheduler #it returns the native apscheduler instance scheduler.reschedule_job('my_job_id', trigger='cron', minute='*/5')

job_success
job_success(event)

Job Success.

Event when a Job was executed successfully.

:param apscheduler.events.JobExecutionEvent event: job execution event

periodic_lock_check async
periodic_lock_check(app)

Periodically checks if the lock is available, attempting to acquire if not held.

set_workers
set_workers()

Create the instance of Queue Workers.

startup async
startup(app, conn)

Scheduler Startup.