Introduction
Wouldn’t be cool if we had something like task.delay()
that runs the job after certain amount of time, or even having that job runs constantly without any loop?
Well, Its your lucky day!
Introducing SCHEDULER!
What is Scheduler?
Scheduler is a module that allows you to run multiple functions by just adding the job to the Schedule list.
You might ask, so where is the “loop” part without any loop?
All you have to do is Scheduler:run(true)
The true
in there is for loop or not, so if set false or nil it won’t continue running jobs afterward.
How to use
All you have to do is to put Scheduler in ReplicatedStorage or somewhere and require it, Since Scheduler is Class you have to use .new() in order for it to work.
local Scheduler = require(path.to.Scheduler)
Scheduler:every(3):seconds():doThis(job, ...)
-- You can do :minutes(), :hours() and even :days() !!
What to come next
I’ve been planning on adding few stuff, Like adding support for Unix timestamp
Adding ordered Schedule:run()
, because as of right now its un-ordered meaning all jobs run when the time comes.
Download
Github page: GitHub - ItzMrRatsP/Schedule: Schedule is a public library that allows you to run tasks inorder
- There is 2 examples of how to use it on the github
Roblox Model: https://create.roblox.com/store/asset/119837892680676
- No examples included, Check github for the examples
Showcase
Socials
Twitter: x.com
Roblox: ItzMrRatsP - Roblox