const classcron::CronService

sys::Obj
  cron::CronService : sys::Service

CronService

addJob

Source

This addJob(Str name, Method method, Obj schedule)

Add a CronJob to this service.

dir

Source

const File dir := Env.cur().workDir() + `cron/`

Directory for job config and logs.

jobLogLimit

Source

const Int jobLogLimit := 30

Number of logs to keep per job.

jobs

Source

Str:Obj?[] jobs()

List current jobs.

make

Source

new make(|This? f := null)

Constructor.

onStart

Source

virtual override Void onStart()

Start service.

onStop

Source

virtual override Void onStop()

Stop service will block until all jobs are complete.

removeJob

Source

This removeJob(Str name)

Remove given job from service.