简体   繁体   中英

Self-Executing C program or Bash file

I am writing a program/script that should check what services are running on a computer every hour. Is there a way to automatically launch this program every hour? I could manually launch it but that would defeat the purpose of the script. Sorry for the ambiguity of the question. I will update it as I get responses.

EDIT: Linux local desktops and Windows remote desktops. Cron and scheduler seem to be the tools needed to launch the program. How do I automatically add my script to them? Manually adding the script to each box would be tedious.

This is more about your OS than language.

You could make an app that sleeps for 60 mins then does a check (put it in a loop and you're done), but on unix systems you would be better of using cron. On Windows it's called the scheduler and has APIs to access it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM