1830225 Members
1746 Online
109999 Solutions
New Discussion

Re: script in linux

 
rmedidi
Contributor

script in linux

Hi every one.
Can you give me the steps in the script file which has to start and stop services at specified time period.

thnx
3 REPLIES 3
Jees Joy
Frequent Advisor

Re: script in linux

could you be please little more clear,
Steven E. Protter
Exalted Contributor

Re: script in linux

Shalom rmedidi,

Such a script can reside anywhere on your system.

It must have the command /sbin/service start/stop to work.

You schedule it with cron.

man cron

crontab -l
#lists
crontab -e
#edits ! be careful

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Alan_152
Honored Contributor

Re: script in linux

I would suggest reading chapters 10-12 of Mark Sobell's "Unix System V -- A Practical Guide". This is a college level textbook that I use in both my intro to unix and my unix scripting classes.

You'll also want to read up on the cron, at, sleep, and wait commands, depending on your actual scheduling needs.