Menu

1 / 2

Task schedule is a piece of shit

DEV Community·Transpective_dev_team·6 months ago
#qcZ9LqrN
Reading 0:00
15s threshold

Welcome to Fuck!timeScheduler

what can we do ?

run your ts file on a specific time

we support interval, atTime, and inRange

inRange: you can specify the range to run your script

atTime: you can specify the time to run your script

interval: you can specify the interval to run your script

format: {

plain (e.g. inRange): hh:mm

complex (e.g. atTime): dd/mm/yyyy hh:mm

}

check api.ts for more information

how to use ?

create TS file in scripts folder with .sche.ts extension

create your script!

// import api from api.ts import { API } from ' ./api.ts '

// instantiate API const timer = new API ()

// example 1:

// call every 5 minutes

timer . interval ({ min : 5 , func : () => { console . log ( ' hello world ' ) } })

// example 2:

// call everyday at 10:00

timer . atTime ({ time : ' 10:00 ' , func : () => { console .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.