Re: still ... problem with my crontab

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

 



On Mon, 2003-10-06 at 15:31, Cameron Simpson wrote:
> 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)

thanks... this one works.... 

i wasn't expecting this path problem becuase my script works... ok for
now i change the proper path in my scripts... and its now working fine..

thanks alot

> 
> 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
-- 
====================
  -- Kent C. Emia --
====================
Software Studio for Concepts,
Development and Research, Corp.
: Unit 307 3rd flr Central Plaza 1,
   J.P. Laurel Avenue, Davao City
   8000 Philippines
: http://www.cdr.com.ph
: +(6382)225-3728

- my IM's -
icq     : 347511398
yahoo   : kent_emia
hotmail : kentskie

- my page


- my mobile -


-- 
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