Mombu the GNU Linux Forum sponsored links

Go Back   Mombu the GNU Linux Forum > GNU_Linux > scheduling a script?
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 2nd September 10:32
t_polzin@yahoo.com (terry
External User
 
Posts: 1
Default scheduling a script?



Personally, this is a job for the rc.local script/file. That's where
I would put extra stuff I wanted to run during every boot.
  Reply With Quote


  sponsored links


2 2nd September 13:38
ynotssor
External User
 
Posts: 1
Default scheduling a script?



Wrap your python command(s) in a script, the first 3 lines of which are
e.g.:

#!/usr/bin/python
# chkconfig: 345 99 01
# description: Description of your script intentions

and which contains "start" and "stop" sections; see other scripts in
/etc/rc.d/init.d for examples.

This tells init to run the script in default run levels 3, 4 and 5, with
start/stop priorities of 99 and 01 (e.g., start last, kill first). Then
place the script in /etc/rc.d/init.d.

You can then see the script enablements with "chkconfig --list", and use
other parameters to the chkconfig command to turn the script on or off in
whatever run levels you wish.

Basically, "chkconfig yourscript on" will enable yourscript to start in the
default run levels contained in the script. chkconfig will manage the
creation of the appropriate symlinks in the various run level directories.


tony

--
use hotmail com for any email replies

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666