Re: still ... problem with my crontab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14:58 06 Oct 2003, kent emia <kent-cdr@xxxxxxxxxxxxxxx> wrote:
| ok. i have to make a crontab to automate the connection of workstations
| to the internet, using iptables there are certain times they are allow
| and not...
| 
| so i created a script files named 
| 'restoreConnection' and 'dropConnection' exucuting these files is not a
| problem but when applying to the crontab is ...
| 
| in the crontab when i will say 
| 30 8 * * * echo "test">cron.file 
| it will work but if followed by an iptable command
| 
| 30 8 * * *  echo "test">cron.file 
| 30 8 * * * iptables -F CUSTOMINPUT (this wont work)

I would guess iptables isn't in your $PATH during cron.
Cron's environment is quite spartan, and not what you
have in your login shell.
Do you get any error messages (eg in root's mail file)?

Try:

	30 8 * * * /sbin/iptables -F CUSTOMINPUT (this wont work)

If that's ok then you know it's your $PATH, so set up the PATH
variable, eg:

	PATH=/bin:/sbin:/usr/bin:/usr/sbin
	30 8 * * * iptables -F CUSTOMINPUT (this wont work)

and try it that way (note that we're back to plain "iptables" in the
command name because the PATH should be good now).
--
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

The Tao that is seen
Is not the true Tao, until
You bring fresh toner.
- Haiku Error Messages http://www.salonmagazine.com/21st/chal/1998/02/10chal2.html


-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux