Skip to content
/ cron Public

A job scheduling API for Fantom

License

Notifications You must be signed in to change notification settings

novant-io/cron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cron

A job scheduling API for Fantom:

// start service
cron := CronService()
cron.start

// add jobs
cron.addJob("job-a", JobA#run, CronSchedule("every 20min"))
cron.addJob("job-b", JobB#run, CronSchedule("daily at 10:15"))

...

// stop service
cron.stop

...

class JobA
{
  // no-arg job function
  Void run() { ... }
}

class JobB
{
  // optionally take a job specific Log instance for logging
  Void run(Log log) { ... }
}

Schedule Format

every 10sec
daily at 15:00
weekly on sun at 10:00
monthly on 1,15 at 10:00

API

See full API on Eggbox.