Skip to content

Scheduler

flowtask.scheduler.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.