Skip to content

abhijit-hota/crongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Crongo πŸ•™

Crongo is a simple cron job runner written in Go. It allows you to schedule jobs using a cron expression.

Usage

As a library

The library exposes a single function RunCronJob which takes in a cron expression and a function to be executed.

package main

import (
    "fmt"
    "time"

    "abhijithota.me/crongo"
)

func main() {
    crongo.RunCronJob("*/5 * * * * *", func() {
        fmt.Println("Hello, World!")
    })
}

As a CLI

The CLI exposes a single command crongo which takes in a cron expression and a command to be executed, both as strings.

$ crongo "*/5 * * * * *" 'echo "Hello, World!"'

Future (?)

  • Multiple jobs
  • More cron expressions
  • crontab file support
  • Add tests

Inspiration

This is a weekend project, made because I just thought about implementing a Cron job runner PoC. Is nt tested properly. Use at your own risk. Or don't use it at all. Yeah, that's better.

About

πŸ•™ A simple cron job runner in Go

Topics

Resources

License

Stars

Watchers

Forks

Languages