Liking cljdoc? Tell your friends :D

metabase.task

Background task scheduling via Quartzite. Individual tasks are defined in metabase.task.*.

Regarding Task Initialization:

The most appropriate way to initialize tasks in any metabase.task.* namespace is to implement the task-init function which accepts zero arguments. This function is dynamically resolved and called exactly once when the application goes through normal startup procedures. Inside this function you can do any work needed and add your task to the scheduler as usual via schedule-task!.

Quartz JavaDoc

Find the JavaDoc for Quartz here: http://www.quartz-scheduler.org/api/2.3.0/index.html

Background task scheduling via Quartzite. Individual tasks are defined in `metabase.task.*`.

## Regarding Task Initialization:

The most appropriate way to initialize tasks in any `metabase.task.*` namespace is to implement the `task-init`
function which accepts zero arguments. This function is dynamically resolved and called exactly once when the
application goes through normal startup procedures. Inside this function you can do any work needed and add your
task to the scheduler as usual via `schedule-task!`.

## Quartz JavaDoc

Find the JavaDoc for Quartz here: http://www.quartz-scheduler.org/api/2.3.0/index.html
raw docstring

add-job!clj

(add-job! job)

Inputs: [job :- JobDetail]

Add a job separately from a trigger, replace if the job is already there

Inputs: [job :- JobDetail]

Add a job separately from a trigger, replace if the job is already there
sourceraw docstring

add-trigger!clj

(add-trigger! trigger)

Inputs: [trigger :- Trigger]

Add a trigger. Assumes the trigger is already associated to a job (i.e. trigger/for-job)

Inputs: [trigger :- Trigger]

Add a trigger. Assumes the trigger is already associated to a job (i.e. `trigger/for-job`)
sourceraw docstring

delete-task!clj

(delete-task! job-key trigger-key)

Inputs: [job-key :- JobKey trigger-key :- TriggerKey]

delete a task from the scheduler

Inputs: [job-key :- JobKey trigger-key :- TriggerKey]

delete a task from the scheduler
sourceraw docstring

delete-trigger!clj

(delete-trigger! trigger-key)

Inputs: [trigger-key :- TriggerKey]

Remove trigger-key from the scheduler

Inputs: [trigger-key :- TriggerKey]

Remove `trigger-key` from the scheduler
sourceraw docstring

init!cljmultimethod

(init! job-name-string)

Initialize (i.e., schedule) Job(s) with a given name. All implementations of this method are called once and only once when the Quartz task scheduler is initialized. Task namespaces (metabase.task.*) should add new implementations of this method to schedule the jobs they define (i.e., with a call to schedule-task!.)

The dispatch value for this function can be any unique keyword, but by convention is a namespaced keyword version of the name of the Job being initialized; for sake of consistency with the Job name itself, the keyword should be left CamelCased.

(defmethod task/init! ::SendPulses [_] (task/schedule-task! my-job my-trigger))

Initialize (i.e., schedule) Job(s) with a given name. All implementations of this method are called once and only
once when the Quartz task scheduler is initialized. Task namespaces (`metabase.task.*`) should add new
implementations of this method to schedule the jobs they define (i.e., with a call to `schedule-task!`.)

The dispatch value for this function can be any unique keyword, but by convention is a namespaced keyword version of
the name of the Job being initialized; for sake of consistency with the Job name itself, the keyword should be left
CamelCased.

  (defmethod task/init! ::SendPulses [_]
    (task/schedule-task! my-job my-trigger))
sourceraw docstring

schedule-task!clj

(schedule-task! job trigger)

Inputs: [job :- JobDetail trigger :- Trigger]

Add a given job and trigger to our scheduler.

Inputs: [job :- JobDetail trigger :- Trigger]

Add a given job and trigger to our scheduler.
sourceraw docstring

scheduler-infoclj

(scheduler-info)

Return raw data about all the scheduler and scheduled tasks (i.e. Jobs and Triggers). Primarily for debugging purposes.

Return raw data about all the scheduler and scheduled tasks (i.e. Jobs and Triggers). Primarily for debugging
purposes.
sourceraw docstring

start-scheduler!clj

(start-scheduler!)

Start our Quartzite scheduler which allows jobs to be submitted and triggers to begin executing.

Start our Quartzite scheduler which allows jobs to be submitted and triggers to begin executing.
sourceraw docstring

stop-scheduler!clj

(stop-scheduler!)

Stop our Quartzite scheduler and shutdown any running executions.

Stop our Quartzite scheduler and shutdown any running executions.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close