Oh! If I am understanding you correctly, all you want is for a script, which could be any script, to run at startup & once every hour! This is easy!
Your first problem is getting it run at boot. To use the /etc/rc.d files, known as the SysV system, the script that gets run needs to have a particular format. You would use this method if you need it to run at a particular part of the boot sequence, like before the firewall but after the network is up. Also this method gives you a pretty / professional way of running a script at boot for it can produce a nice "Passed / Failed" line to be displayed at it's particular part of the boot sequence which can be handy if you need to know if the script was successfully, like what you see when you click the "Show Details" button on the Fedora boot screen. I can take you thru it if you would like to go to this much trouble, or if you are simply curious & would like to know how it's done.
There is, however, a much simpler way of getting this script to run, the only thing is that it won't be run until all the system stuff has finished, which I don't think should be a problem for you. Simply add the script name to a new line in the file :
/etc/rc.d/rc.local
This file is specifically for running user designated scripts at boot.
The following is an example of my /etc/rc.d/rc.local file with your script added at the bottom :
Code:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
# i2C adapter drivers
modprobe i2c-i801
modprobe i2c-isa
# I2C chip drivers
modprobe lm75
modprobe eeprom
modprobe w83627hf
sleep 2 # optional
/usr/bin/sensors -s # recommended
# Fix for mplayer
echo 1024 > /proc/sys/dev/rtc/max-user-freq
# /sbin/modprobe nvidia
ip-update
Your file will, of course, look rather different than this. If you are still unsure, post your /etc/rc.d/rc.local file & I'll show you.
As for your cron job to run it every hour, how are you trying to achieve this currently? If you haven't already, you need to add a cron job via crontab. I find it's easier to edit in gedit, execute the following to make gedit your default crontab editor :
From a terminal, "su -" to root & open the file :
/etc/profile
Add the line :
just above the following line :
Code:
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
& add "VISUAL" to the end of the above line, should look something like :
Code:
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC VISUAL
Finally, save & close the file.
To activate this change you need to go back to the terminal, logout from root with " <CTRL> d " & log back in again with " su - ".
Now run :
This will open roots crontab file for editing.
Check out :
http://enterprise.linux.com/article..../08/10/1948233
for a brief tutorial on the syntax of the crontab file.
Basically, the line that you will want to add to your crontab file should look like :
Code:
0 * * * * ip-update
Save the file & close it. You should get a message that says :
Code:
crontab: installing new crontab
This should now run your script every time you boot & then once every hour, on the hour.
If you have any problems let me know & I'll help you solve them. Otherwise if all goes smoothly then please post one last time to let me this.
Good Luck!