The cl-cron Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-cron Reference Manual

This is the cl-cron Reference Manual, version 0.1, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 03:11:28 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

1.1 cl-cron

Author

Mackram G Raydan

License

GPL

Description

A simple tool that provides cron like facilities directly inside of common lisp. For this to work properly note that your lisp implementation should have support for threads

Version

0.1

Dependency

bordeaux-threads

Source

cl-cron.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

2 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

2.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.1 cl-cron.asd

Location

cl-cron.asd

Systems

cl-cron (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.2 cl-cron/packages.lisp

Parent

cl-cron (system)

Location

packages.lisp

Packages

cl-cron


Previous: , Up: Lisp files   [Contents][Index]

2.1.3 cl-cron/cl-cron.lisp

Dependency

packages.lisp (file)

Parent

cl-cron (system)

Location

cl-cron.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

3 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

3.1 cl-cron

Source

packages.lisp (file)

Nickname

cron

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

4.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

4.1.1 Special variables

Special Variable: *cron-load-file*

a parameter which points to a lisp or fasl file which would be loaded once start-cron is called. The boot file should be made of as many make-cron-job calls as you like one after the other in normal s-expression fashion.

Package

cl-cron

Source

cl-cron.lisp (file)

Special Variable: *cron-log-file*

a parameter to set the cron file log location.

Package

cl-cron

Source

cl-cron.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

4.1.2 Functions

Function: delete-cron-job CRON-KEY

deletes the cron job with the corresponding hash key

Package

cl-cron

Source

cl-cron.lisp (file)

Function: gen-list START-LIST END-LIST &optional INCREMENT

functions that returns a list of numbers starting with start-list and ending with end-list

Package

cl-cron

Source

cl-cron.lisp (file)

Function: log-cron-message MESSAGE &optional TYPE

Simply log the message sent with type as well

Package

cl-cron

Source

cl-cron.lisp (file)

Function: make-cron-job FUNCTION-SYMBOL &key MINUTE STEP-MIN HOUR STEP-HOUR DAY-OF-MONTH STEP-DOM MONTH STEP-MONTH DAY-OF-WEEK STEP-DOW BOOT-ONLY HASH-KEY

creates a new instance of a cron-job object and appends it to the cron-jobs-list after processing its time. Note that if you wish to use multiple values for each parameter you need to provide a list of numbers or use the gen-list function. You can not have a list of symbols when it comes to month or day-of-week. Please note that as by ANSI Common Lisp for the month variable the possible values are between 1 and 12 inclusive with January=1 and for day of week the possible values are between 0 and 6 with Monday=0. Returns the hash-key

Package

cl-cron

Source

cl-cron.lisp (file)

Function: max-list LST

finds the minimum element of a list

Package

cl-cron

Source

cl-cron.lisp (file)

Function: min-list LST

finds the minimum element of a list

Package

cl-cron

Source

cl-cron.lisp (file)

Function: restart-cron ()

function that starts up cron but without loading the file or running any of the boot only cron jobs in the list

Package

cl-cron

Source

cl-cron.lisp (file)

Function: start-cron ()

function that starts cron by first loading the cron file defined in the variable, then it runs any cron-job that has the job-only-at-boot property set to t. Finally, it starts a thread that runs cron-dispatcher

Package

cl-cron

Source

cl-cron.lisp (file)

Function: stop-cron ()

allows the stoppage of cron through the killing of the cron-dispatcher. Note that cron-dispatcher is killed only if it is sleeping otherwise we wait till the cron jobs finish. To reuse cron after calling stop-cron, you would need to recall start-cron which would go through all the steps as if cron has just booted. If you wish to prevent these actions when you restart cron then please you restart-cron.

Package

cl-cron

Source

cl-cron.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

4.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

4.2.1 Special variables

Special Variable: *cron-dispatcher-processing*

allows us to not kill the thread unless the lock can be acquired

Package

cl-cron

Source

cl-cron.lisp (file)

Special Variable: *cron-dispatcher-thread*

a parameter to that holds the cron-dispatcher thread

Package

cl-cron

Source

cl-cron.lisp (file)

Special Variable: *cron-jobs-hash*

contains a hash of all corn-job objects that need to be run

Package

cl-cron

Source

cl-cron.lisp (file)

Special Variable: *day-list*
Package

cl-cron

Source

cl-cron.lisp (file)

Special Variable: *month-list*
Package

cl-cron

Source

cl-cron.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

4.2.2 Macros

Macro: def-cron-get-methods TAG-NAME UNIT-TOTAL-LIST &optional ALLOWS-SYMBOLS SYMBOL-LIST SYMBOL-OFFSET
Package

cl-cron

Source

cl-cron.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

4.2.3 Functions

Function: cron-dispatcher ()

function that dispatches the jobs that are ready to be run

Package

cl-cron

Source

cl-cron.lisp (file)

Function: elements-within-step LST STEP

function that returns a list of elements that are within a step from each other starting with the first element in the list

Package

cl-cron

Source

cl-cron.lisp (file)

Function: expand-internal-lists LST

function that takes a list and returns a list but with all internal lists expanded

Package

cl-cron

Source

cl-cron.lisp (file)

Function: get-days-of-month UNIT STEP-UNIT
Package

cl-cron

Source

cl-cron.lisp (file)

Function: get-days-of-week UNIT STEP-UNIT
Package

cl-cron

Source

cl-cron.lisp (file)

Function: get-hours UNIT STEP-UNIT
Package

cl-cron

Source

cl-cron.lisp (file)

Function: get-minutes UNIT STEP-UNIT
Package

cl-cron

Source

cl-cron.lisp (file)

Function: get-months UNIT STEP-UNIT
Package

cl-cron

Source

cl-cron.lisp (file)

Function: run-job-if-boot KEY JOB

runs the cron-job object in a separate thread if it is a boot job

Package

cl-cron

Source

cl-cron.lisp (file)

Function: run-job-if-time KEY JOB

runs the cron-job object in a separate thread if it is its time

Package

cl-cron

Source

cl-cron.lisp (file)

Function: time-to-run-job JOB

checks if it is time to run the current job based on the current time

Package

cl-cron

Source

cl-cron.lisp (file)

Function: time-until-full-minute TIME
Package

cl-cron

Source

cl-cron.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

4.2.4 Generic functions

Generic Function: job-@boot OBJECT
Generic Function: (setf job-@boot) NEW-VALUE OBJECT
Package

cl-cron

Methods
Method: job-@boot (CRON-JOB cron-job)

automatically generated reader method

Source

cl-cron.lisp (file)

Method: (setf job-@boot) NEW-VALUE (CRON-JOB cron-job)

automatically generated writer method

Source

cl-cron.lisp (file)

Generic Function: job-dom OBJECT
Generic Function: (setf job-dom) NEW-VALUE OBJECT
Package

cl-cron

Methods
Method: job-dom (CRON-JOB cron-job)

automatically generated reader method

Source

cl-cron.lisp (file)

Method: (setf job-dom) NEW-VALUE (CRON-JOB cron-job)

automatically generated writer method

Source

cl-cron.lisp (file)

Generic Function: job-dow OBJECT
Generic Function: (setf job-dow) NEW-VALUE OBJECT
Package

cl-cron

Methods
Method: job-dow (CRON-JOB cron-job)

automatically generated reader method

Source

cl-cron.lisp (file)

Method: (setf job-dow) NEW-VALUE (CRON-JOB cron-job)

automatically generated writer method

Source

cl-cron.lisp (file)

Generic Function: job-func OBJECT
Generic Function: (setf job-func) NEW-VALUE OBJECT
Package

cl-cron

Methods
Method: job-func (CRON-JOB cron-job)

automatically generated reader method

Source

cl-cron.lisp (file)

Method: (setf job-func) NEW-VALUE (CRON-JOB cron-job)

automatically generated writer method

Source

cl-cron.lisp (file)

Generic Function: job-hour OBJECT
Generic Function: (setf job-hour) NEW-VALUE OBJECT
Package

cl-cron

Methods
Method: job-hour (CRON-JOB cron-job)

automatically generated reader method

Source

cl-cron.lisp (file)

Method: (setf job-hour) NEW-VALUE (CRON-JOB cron-job)

automatically generated writer method

Source

cl-cron.lisp (file)

Generic Function: job-minute OBJECT
Generic Function: (setf job-minute) NEW-VALUE OBJECT
Package

cl-cron

Methods
Method: job-minute (CRON-JOB cron-job)

automatically generated reader method

Source

cl-cron.lisp (file)

Method: (setf job-minute) NEW-VALUE (CRON-JOB cron-job)

automatically generated writer method

Source

cl-cron.lisp (file)

Generic Function: job-month OBJECT
Generic Function: (setf job-month) NEW-VALUE OBJECT
Package

cl-cron

Methods
Method: job-month (CRON-JOB cron-job)

automatically generated reader method

Source

cl-cron.lisp (file)

Method: (setf job-month) NEW-VALUE (CRON-JOB cron-job)

automatically generated writer method

Source

cl-cron.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

4.2.5 Classes

Class: cron-job ()
Package

cl-cron

Source

cl-cron.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: minute
Initargs

:job-minute

Initform

:every

Readers

job-minute (generic function)

Writers

(setf job-minute) (generic function)

Slot: hour
Initargs

:job-hour

Initform

:every

Readers

job-hour (generic function)

Writers

(setf job-hour) (generic function)

Slot: day-of-month
Initargs

:job-dom

Initform

:every

Readers

job-dom (generic function)

Writers

(setf job-dom) (generic function)

Slot: month
Initargs

:job-month

Initform

:every

Readers

job-month (generic function)

Writers

(setf job-month) (generic function)

Slot: day-of-week
Initargs

:job-dow

Initform

:every

Readers

job-dow (generic function)

Writers

(setf job-dow) (generic function)

Slot: at-boot
Initargs

:job-@boot

Readers

job-@boot (generic function)

Writers

(setf job-@boot) (generic function)

Slot: function-symbol
Initargs

:job-func

Readers

job-func (generic function)

Writers

(setf job-func) (generic function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-cron.asd: The cl-cron<dot>asd file
cl-cron/cl-cron.lisp: The cl-cron/cl-cron<dot>lisp file
cl-cron/packages.lisp: The cl-cron/packages<dot>lisp file

F
File, Lisp, cl-cron.asd: The cl-cron<dot>asd file
File, Lisp, cl-cron/cl-cron.lisp: The cl-cron/cl-cron<dot>lisp file
File, Lisp, cl-cron/packages.lisp: The cl-cron/packages<dot>lisp file

L
Lisp File, cl-cron.asd: The cl-cron<dot>asd file
Lisp File, cl-cron/cl-cron.lisp: The cl-cron/cl-cron<dot>lisp file
Lisp File, cl-cron/packages.lisp: The cl-cron/packages<dot>lisp file

Jump to:   C   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
C   D   E   F   G   J   L   M   R   S   T  
Index Entry  Section

(
(setf job-@boot): Internal generic functions
(setf job-@boot): Internal generic functions
(setf job-dom): Internal generic functions
(setf job-dom): Internal generic functions
(setf job-dow): Internal generic functions
(setf job-dow): Internal generic functions
(setf job-func): Internal generic functions
(setf job-func): Internal generic functions
(setf job-hour): Internal generic functions
(setf job-hour): Internal generic functions
(setf job-minute): Internal generic functions
(setf job-minute): Internal generic functions
(setf job-month): Internal generic functions
(setf job-month): Internal generic functions

C
cron-dispatcher: Internal functions

D
def-cron-get-methods: Internal macros
delete-cron-job: Exported functions

E
elements-within-step: Internal functions
expand-internal-lists: Internal functions

F
Function, cron-dispatcher: Internal functions
Function, delete-cron-job: Exported functions
Function, elements-within-step: Internal functions
Function, expand-internal-lists: Internal functions
Function, gen-list: Exported functions
Function, get-days-of-month: Internal functions
Function, get-days-of-week: Internal functions
Function, get-hours: Internal functions
Function, get-minutes: Internal functions
Function, get-months: Internal functions
Function, log-cron-message: Exported functions
Function, make-cron-job: Exported functions
Function, max-list: Exported functions
Function, min-list: Exported functions
Function, restart-cron: Exported functions
Function, run-job-if-boot: Internal functions
Function, run-job-if-time: Internal functions
Function, start-cron: Exported functions
Function, stop-cron: Exported functions
Function, time-to-run-job: Internal functions
Function, time-until-full-minute: Internal functions

G
gen-list: Exported functions
Generic Function, (setf job-@boot): Internal generic functions
Generic Function, (setf job-dom): Internal generic functions
Generic Function, (setf job-dow): Internal generic functions
Generic Function, (setf job-func): Internal generic functions
Generic Function, (setf job-hour): Internal generic functions
Generic Function, (setf job-minute): Internal generic functions
Generic Function, (setf job-month): Internal generic functions
Generic Function, job-@boot: Internal generic functions
Generic Function, job-dom: Internal generic functions
Generic Function, job-dow: Internal generic functions
Generic Function, job-func: Internal generic functions
Generic Function, job-hour: Internal generic functions
Generic Function, job-minute: Internal generic functions
Generic Function, job-month: Internal generic functions
get-days-of-month: Internal functions
get-days-of-week: Internal functions
get-hours: Internal functions
get-minutes: Internal functions
get-months: Internal functions

J
job-@boot: Internal generic functions
job-@boot: Internal generic functions
job-dom: Internal generic functions
job-dom: Internal generic functions
job-dow: Internal generic functions
job-dow: Internal generic functions
job-func: Internal generic functions
job-func: Internal generic functions
job-hour: Internal generic functions
job-hour: Internal generic functions
job-minute: Internal generic functions
job-minute: Internal generic functions
job-month: Internal generic functions
job-month: Internal generic functions

L
log-cron-message: Exported functions

M
Macro, def-cron-get-methods: Internal macros
make-cron-job: Exported functions
max-list: Exported functions
Method, (setf job-@boot): Internal generic functions
Method, (setf job-dom): Internal generic functions
Method, (setf job-dow): Internal generic functions
Method, (setf job-func): Internal generic functions
Method, (setf job-hour): Internal generic functions
Method, (setf job-minute): Internal generic functions
Method, (setf job-month): Internal generic functions
Method, job-@boot: Internal generic functions
Method, job-dom: Internal generic functions
Method, job-dow: Internal generic functions
Method, job-func: Internal generic functions
Method, job-hour: Internal generic functions
Method, job-minute: Internal generic functions
Method, job-month: Internal generic functions
min-list: Exported functions

R
restart-cron: Exported functions
run-job-if-boot: Internal functions
run-job-if-time: Internal functions

S
start-cron: Exported functions
stop-cron: Exported functions

T
time-to-run-job: Internal functions
time-until-full-minute: Internal functions

Jump to:   (  
C   D   E   F   G   J   L   M   R   S   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
A   D   F   H   M   S  
Index Entry  Section

*
*cron-dispatcher-processing*: Internal special variables
*cron-dispatcher-thread*: Internal special variables
*cron-jobs-hash*: Internal special variables
*cron-load-file*: Exported special variables
*cron-log-file*: Exported special variables
*day-list*: Internal special variables
*month-list*: Internal special variables

A
at-boot: Internal classes

D
day-of-month: Internal classes
day-of-week: Internal classes

F
function-symbol: Internal classes

H
hour: Internal classes

M
minute: Internal classes
month: Internal classes

S
Slot, at-boot: Internal classes
Slot, day-of-month: Internal classes
Slot, day-of-week: Internal classes
Slot, function-symbol: Internal classes
Slot, hour: Internal classes
Slot, minute: Internal classes
Slot, month: Internal classes
Special Variable, *cron-dispatcher-processing*: Internal special variables
Special Variable, *cron-dispatcher-thread*: Internal special variables
Special Variable, *cron-jobs-hash*: Internal special variables
Special Variable, *cron-load-file*: Exported special variables
Special Variable, *cron-log-file*: Exported special variables
Special Variable, *day-list*: Internal special variables
Special Variable, *month-list*: Internal special variables

Jump to:   *  
A   D   F   H   M   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   P   S  
Index Entry  Section

C
cl-cron: The cl-cron system
cl-cron: The cl-cron package
Class, cron-job: Internal classes
cron-job: Internal classes

P
Package, cl-cron: The cl-cron package

S
System, cl-cron: The cl-cron system

Jump to:   C   P   S