https://github.com/dsaouda/scron
Simple cron linux for any OS
https://github.com/dsaouda/scron
cron cron-linux crontab golang linux windows
Last synced: 4 months ago
JSON representation
Simple cron linux for any OS
- Host: GitHub
- URL: https://github.com/dsaouda/scron
- Owner: dsaouda
- License: apache-2.0
- Created: 2018-12-08T10:29:35.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2021-07-06T13:29:08.000Z (almost 4 years ago)
- Last Synced: 2024-06-20T06:23:05.095Z (12 months ago)
- Topics: cron, cron-linux, crontab, golang, linux, windows
- Language: Go
- Homepage: https://github.com/dsaouda/scron
- Size: 16.6 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/dsaouda/scron/releases/latest)
[](https://goreportcard.com/report/github.com/dsaouda/scron)# scron
Simple cron linux for any OS
## Why
Especially for running on windows, but you can use it to run on linux if you want to run a command every second.
## Crontab expression
Example of job definition:
.------------------ seconds (0 - 59)
| .---------------- minute (0 - 59)
| | .------------- hour (0 - 23)
| | | .---------- day of month (1 - 31)
| | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
| | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
| | | | | |
* * * * * * command to be executedFor more detail see
## Download
Download the latest version in or run `go get github.com/dsaouda/scron`
## Run
Create a file named *crontab* in the same directory as the binary then run `scron`
## Example crontab file for windows
`* * * * * * echo %time% >> time.txt`
This cron print OS time every second