How to Run Tools Created in the Go Language Periodically

Asked 2 years ago, Updated 2 years ago, 73 views

I created a tool in Go language to study.

The general features are as follows:

I would like to do this once a day at 18:00.

You can run it at 18:00 in the program, but you have to keep your PC running all the time.

Therefore, if there is a way to start the program itself at 18:00, please let me know.

In the case of web applications, I have experience in deploying to AWS and Heroku, so I can imagine it, but I have no knowledge of it, so I am asking you a question.

Thank you for your cooperation.

go

2022-09-30 18:10

1 Answers

You can run it at 18:00 in the program, but you have to keep your PC running all the time.

So the premise of the question is that you use your PC, but you usually turn it off, or you don't know if it's turned on or off at 18:00?
(If that's not the case, I think it would be easier to have a VPS or cloud server on the outside and keep it up all the time.)

The menu screen (also known as BIOS screen) that can be turned on immediately after the PC is turned on may have a setting to boot the PC at a specified time.

Also, if the router device is always on, you may be able to set it to power on your PC over the network by sending Wake-on-LAN packets at the designated time using the router function.

As long as your PC starts up, you can start it at 18:00 with cron, or run a script that always runs after startup and start the program at a specified time.


2022-09-30 18:10

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.