Skip to content

sidyhe/lcron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

lcron

unix like cron bindings for lua

build

sample

local lcron = require("lcron")

lcron.add("name1", "* * * * * *", function()
    print("hello cron!\n")
end)

lcron.add("name2", "* * * * * *", function()
    print("hello cron2!\n")
end)

lcron.delete("name2")

-- wait for 1 sec
local now = os.time()
while now == os.time() do
    -- spin
end

lcron.update()

lcron.delete("name1")
lcron.delete("name666") -- not exist

license

no license, any way you want.

About

unix like cron bindings for lua

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published