Is it posible to relaunch my program after it exits? It's like setting a timer to launch my program, but it does exit each time.
Here is pseudocode:
int main()
{
MyFunc();
exit();
RestartMeEveryHour();
}
There may be two different options:
Besides using cron
(in Unix/Linux/OSX) or scheduler
(Windows), you can of course do:
int main()
{
for(;;)
{
MyFunc();
sleepOneHour();
}
}
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.