T
T
T3R3AND2020-02-18 23:37:58
Node.js
T3R3AND, 2020-02-18 23:37:58

Is it possible to run a job every hour without cron?

The question is in the title. Can you help?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alexey Shashenkov, 2020-02-18
@teknik2008

setTimeout

K
Karpion, 2020-02-19
@Karpion

cron is just a program that regularly performs some actions and then "goes to sleep" until the next awakening (when to wake up is determined by the job schedule). Nobody prevents you from writing a similar program; but note that it must run in daemon mode, i.e. "be resident" in terms of DOS (DOS has not been used for a long time, and the terminology is sometimes relevant).
But if "once an hour" - then it's easier through cron.

B
Bohdan Petrov, 2020-02-19
@mindyourlifeguide

systemd timer as an option. I use Manjaro.

V
Vladimir, 2020-02-19
@HistoryART

setInterval(myFunc, 1000*60*60);

H
hzzzzl, 2020-02-19
@hzzzzl

https://www.npmjs.com/package/cron

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question