https://github.com/131/swarm-pulse
A docker swarm task scheduler
https://github.com/131/swarm-pulse
Last synced: 4 months ago
JSON representation
A docker swarm task scheduler
- Host: GitHub
- URL: https://github.com/131/swarm-pulse
- Owner: 131
- License: mit
- Created: 2024-04-08T10:44:18.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-07T12:15:21.000Z (over 1 year ago)
- Last Synced: 2025-09-18T04:44:28.403Z (9 months ago)
- Language: JavaScript
- Size: 53.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/131/swarm-pulse/actions/workflows/test.yml)
[](https://coveralls.io/github/131/swarm-pulse?branch=master)
[](https://www.npmjs.com/package/swarm-pulse)
[](http://opensource.org/licenses/MIT)
[](https://www.npmjs.com/package/eslint-plugin-ivs)
# Motivation
[swarm-pulse](https://github.com/131/swarm-pulse) is a SDK for a docker swarm scheduler engine.
# Setup
export PULSE_CONFIG_PATH=$(pwd)/test/tasks-offline.json
export DEBUG=*,-express:*,-send,-eslint:*,-eslintrc:*
# Query plan
```
* * * * * *
┬ ┬ ┬ ┬ ┬ ┬
│ │ │ │ │ |
│ │ │ │ │ └ day of week (0 - 7) (0 or 7 is Sun)
│ │ │ │ └───── month (1 - 12)
│ │ │ └────────── day of month (1 - 31)
│ │ └─────────────── hour (0 - 23)
│ └──────────────────── minute (0 - 59)
└───────────────────────── second (0 - 59, optional)
0 */2 * * *
=> trigger every 2 hour
```
# Persistence
By design, we avoir keeping any persistence, task are awaited until their scheduled trigger. If the trigger is missed, the tasks will have to wait until the next event.
# Status
* **running** (sql query is ongoing)
* **pending** (query is scheduled to be executed ASAP)
* **scheduled** (query is awaiting a futur trigger)
# Overlap
Overlapping tasks are _dropped_. I.e. : if as task currently **running** (or **pending**) and the schedule trigger is fired, execution order will be droppped (until next tick)
Killing the daemon will abort all running (and pending) tasks until next scheduled trigger.
# Credits
* [131](https://github.com/131)