scron

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

README

Release Go Report

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 https://godoc.org/github.com/robfig/cron#hdr-CRON_Expression_Format

Download

Download the latest version in https://github.com/dsaouda/scron/releases 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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址