Skip to content

A GO program which runs traditional way of cron job and also supports http based event triggers to run tasks

Notifications You must be signed in to change notification settings

saurabhguptag/event-cron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

event-cron

A GO program which runs traditional way of cron job and also supports http based event triggers to run tasks

Configuration

There are two Configuration involved one which configures the server and other which listing the Jobs

  • config/config.json
  • config/cronjob

Server config

This is a JSON file containing information about server host and port, log level, and cronjob file path

Cronjob config

The cron module is based on github.com/robfig/cron following is the usage.

Cron spec format

Event spec format

  • An Event is defined by double @@ symbol followed by command to execute for example

        @@my-event ls -lrt
    
  • The above event can be invoked by a http request as http://[host]:[port]/run-cron?event=my-event

About

A GO program which runs traditional way of cron job and also supports http based event triggers to run tasks

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages