Here's the situation... I start a process using cron, but I need to kill that process one hour later using cron. There doesn't seem to be a crontab option to run a command for a specified period of time. I suppose I could set an environment variable at the start of the process containing the process ID and an hour later use that environment variable as an argument to "kill", but I do not know a way to retrieve the process ID.

Would it be easy to parse "ps | grep <command_name>" or is there an better way to do this?

Any suggestions?

TIA,
Victor
--
TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ  : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc

Reply via email to