Skip to content

AGhost-7/schedule-m8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Schedule-m8

gr8 scheduling m8.

Usage (docker)

Here's how to get started quickly with docker:

docker run --rm -p 8090:8090 -e SCHEDULE_M8_BIND_ADDR='0.0.0.0:8090' aghost7/schedule-m8

API

POST->/api/job

Schedules a job. The message body's structure is the following:

{
	"method": "POST",
	"body": "{}",
	"timestamp": 1494183499406,
	"url": "http://localhost:3000"
}

Where:

  • method is the http method to send the callback to.
  • body is the body of the response.
  • timestamp is the unix epoch in milliseconds of the time the scheduler is to send to request back.
  • url is the address to send the request to.

Returns:

{
	"method": "POST",
	"body": "{}",
	"timestamp": 1494183499406,
	"url": "http://localhost:3000",
	"id": "123-123-1234"
}

POST -> /api/cron

Schedule a cron job. The message's structure is the following:

{
	"method": "POST",
	"body": "{}"
	"timestamp": 1494183499406,
	"schedule": "@daily"
}

Where:

  • method is the http method to send the callback to.
  • body is the body of the response.
  • schedule is a cron expression. For more information, see the cron crate.
  • url is the address to send the request to.

DELETE -> /api/job/:id

Delete a job. Returns a 204 on success.

DELETE -> /api/job

Delete all jobs.

About

A job scheduler written in rust.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages