From: Kenn Humborg (kenn at domain avalon.wombat.ie)
Date: Tue 12 Oct 1999 - 23:18:43 IST
On Tue, Oct 12, 1999 at 07:36:18PM +0100, alan509 wrote:
> I want to add some commands to started everytime my linux machine boots up.
> Im running redhat 6.1.
> I want to add these commands
> ipfwadm -F -p deny
> ipfwadm -F -a m -S 192.168.0.0/24 -D 0.0.0.0/0
> depmod -a
> modprobe ip_masq_ftp
> modprobe ip_masq_raudio
> modprobe ip_masq_irc
> can someone tell me the appropritae file to add these into?
> And where abouts in the file should i enter them into.
The easiest place is at the end of /etc/rc.d/rc.local.
> Also i would like somehow to have a command wvdial
> to run at 6.00pm and to close at 8am weekdays
> and if its possible to get that to run on a friday at 6.00pm and end on a
'cron' is the utility for running commands at regularly scheduled times.
'at' is the utility for running one-off jobs at a certain time in the
Normally, cron looks at the system crontab (/etc/crontab) and individual
users' crontabs (in /var/spool/cron) for stuff to do. Type 'man 5 crontab'
for details on the formats of these files. The only difference between the
system crontab and the user crontabs is that the system crontab contains
a field to specify the user under which to run the command.
In addition, the version of cron included with RH6.x has a neat little
feature. As well as reading /etc/crontab, it will also look into the
directory /etc/cron.d and parse any files in there as if they were
extensions of the system crontab. This makes isolating your changes
easier and gives smoother upgrading of the cron package itself.
So what you should do is create a file in /etc/cron.d that looks something
# Run wvdial to connect each Monday-Friday evening
# (Use 18:05 rather than 18:00 incase our clock is a few
# minutes off UTC)
05 18 * * 1-5 root wvdial connect
# and disconnect each weekday morning
55 7 * * 1-5 root wvdial disconnect
Note that I don't know what the wvdial options are and I doubt
that 'connect' and 'disconnect' will work...
Hope this helps,
Take a look at /etc/cron.d.
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:04:43 GMT