Reputation: 25
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();
}
Upvotes: 0
Views: 203
Reputation: 1376
There may be two different options:
Upvotes: 3
Reputation: 129314
Besides using cron
(in Unix/Linux/OSX) or scheduler
(Windows), you can of course do:
int main()
{
for(;;)
{
MyFunc();
sleepOneHour();
}
}
Upvotes: 1