Skip to content

Execute Cron tasks on server start #4892

Answered by ganigeorgiev
go4cas asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure if that is what you are looking for but you can simply call your function manually, eg.:

function test() {
    console.log(123);
}

test(); // note that the app may not be bootstrapped yet

cronAdd("test", "* * * * *", test)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by go4cas
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants