https://github.com/transitorykris/hypnos
A sleepy cron
https://github.com/transitorykris/hypnos
crontab golang shell unix utilities
Last synced: 5 months ago
JSON representation
A sleepy cron
- Host: GitHub
- URL: https://github.com/transitorykris/hypnos
- Owner: transitorykris
- License: mit
- Created: 2017-02-01T00:01:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-08T00:29:04.000Z (over 8 years ago)
- Last Synced: 2024-06-20T16:39:50.859Z (about 2 years ago)
- Topics: crontab, golang, shell, unix, utilities
- Language: Go
- Size: 3.91 KB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hypnos
A sleepy cron
Ever write little scripts like to do things on some interval?
```bash
#!/bin/bash
while [ 1 ]; do
echo "running some tasks..."
# ...
sleep 3600
done
```
Want it to be more like cron? And start repeatedly at specific times?
```bash
#!/bin/bash
while [ 1 ]; do
hypnos "0 * * * *"
echo "running some tasks..."
# ...
done
```
```
Next run at 2017-01-31 19:00:00 -0800 PST Sleeping for 33m25.234920265s
```
## Installation
Grab a tarball from [Releases](https://github.com/transitorykris/hypnos/releases)
and install in your path.
Or build from source
```
go get github.com/transitorykris/hypnos
```
## Examples
Hypnos follows [cron](https://en.wikipedia.org/wiki/Cron)
Run once per minute
```
hypnos "* * * * *"
```
Run once per week
```
hypnos @weekly
```
Run on Fridays at 5:30pm
```
hypnos "30 17 * * FRI"
```