cancel
Showing results for 
Search instead for 
Did you mean: 

use of cron utility

Anuapm Naik
Occasional Visitor

use of cron utility

I want to execute commands once every hour automatically from 10:00 AM to 19:00 PM with the help of cron utilty,
what will be exact coomand i have to use?
current OS is Hp_ux11i
4 REPLIES
g3jza
Esteemed Contributor

Re: use of cron utility

Hi,
you need to edit the crontab entry:
#crontab -e (under the user which would run the command)

Add line like this:

0 10-19 * * * /path/to/your/command

this will run the command from 10-19 every hour, every day

Anuapm Naik
Occasional Visitor

Re: use of cron utility

thanks for info.
if i want to end procees what will be command to end the process of cron
Thanks
Anupam.
g3jza
Esteemed Contributor

Re: use of cron utility

use
#ps -ef |grep

and send the PID of the command/process the kill command, unless your command/program has any standard way of stopping.

Dennis Handly
Acclaimed Contributor

Re: use of cron utility

>if I want to end process what will be command to end the process of cron

The current process that started on the hour? Or remove the current crontab entry?
As g3jza said use kill.
For the latter, use "crontab -e" to comment out or remove that entry.