I
I
impressive172020-06-12 16:09:15
go
impressive17, 2020-06-12 16:09:15

How to make a function run automatically every day?

I have an Update function on a constantly running server written in GO. I want this function to run let's say every day at 14:00 or for example every 10 hours. How can I do it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Papa, 2020-06-12
Stifflera @PapaStifflera

time.Timer, time.Ticker, time.After to help you.

A
Alexey Maslov, 2020-06-12
@lelick

gocron is ideal for this purpose.

V
Vladimir Korotenko, 2020-06-12
@firedragon

I would write something like curl https://local host/api/function in cron

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question