An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

[![Release](https://img.shields.io/github/v/release/dsaouda/scron.svg?style=for-the-badge)](https://github.com/dsaouda/scron/releases/latest)
[![Go Report](https://goreportcard.com/badge/github.com/dsaouda/scron?style=for-the-badge)](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 executed

For 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