in reply to Detachment problm
Unix cron Windows Task Scheduler On Windows to kill processes by name, taskkill /? will provide some help. On Unix pkill will do it. You know the name(s).
If you don't want that job to run again the next hour, then remove the cron job for it. Normally you shouldn't need your own process to sleep for an hour to start another process ( and since this process is replaced by the new running process, it is hard for me to understand how yet another one could be started). Let the OS run processes according the schedule. If you don't want it to run, remove it from the schedule. If you want to stop it while it is running, use some version of "kill". Yes, if you write a real "fork", if you die as the parent, the child dies too, but that seems overly complex. The exec() that you have now replaces your process with a new process with the same pid.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Detachment problm
by baxy77bax (Deacon) on May 27, 2012 at 21:08 UTC |