🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #15385

Re: programar el cron para la tarifa ondulada de retrete

#15385
From: Han Solo
Date: Wed, 05 Jul 2000 00:00
95 lines
2945 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

"Dakota" <javipa@TIMOmx4.redestb.es> writes:

> Buenasss
> me gusataria poder programar el cron para que haga lo siguiente
> 
> que a las 7:50 AM mate el pppd
> que cada hora lanze el leafnode para actualizar las news
> 
> y como podria hacer para que si entre las 23 horas y las 7:50 se cae la
> conexion la recupere???
> 
> mm
> muchas preguntas?
> pd: no se usar el cron... vamos un novato total!!!

Pues mira, yo lo tengo puesto as�:

crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.XXXXa01196 installed on Thu Jun  8 09:46:45 2000)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=hsolo

05 4  * * * /scripts/remoto
15 4  * * * /scripts/desconecta
30 4  * * * /sbin/halt 

donde
- ---------------------/scripts/remoto------------------
#!/bin/bash
# Scrpit para la conexi�n a internet
# en modo reomoto mientras estoy 
# de vacaciones

# 21/9/99

touch /var/lock/bloqueo
/usr/sbin/pppd

- --------------------/scripts/desconecta --------------
#!/bin/bash
# script para la desconexi�n de inet
# 21/9/99

killall -HUP pppd

y en /etc/ppp/ip-up.d

- ------------------/etc/ppp/ip-up.d/conecta-----------
#!/bin/bash

exec /usr/sbin/sendmail -q &
exec /usr/sbin/get-news >/home/hsolo/noticias 2>&1 &

su hsolo -c /usr/bin/fetchmail -v > /home/hsolo/resultado 2>&1 &

wait

if [ -f /var/lock/bloqueo ]; then
killall -HUP pppd
rm /var/lock/bloqueo
fi

mail -s "Finiquitado" hsolo < /home/hsolo/fin

> Estoy Usando estos SO's :)
> Win98 (4.10.2222A SE), Mandrake 7.1, Windows Millenium Beta3
  ^^^^^^^^^^^^^^^^^^^^^                ^^^^^^^^^^^^^^^^^^^^^^^
   �Uhhhh! yo esto no lo llevar�a a gala ;-)

- -- 
Un Saludo

Han Solo
The Rebel Alliance

Emacs is not on every system

So what? [...] Do you tell your administrative people to stick with
notepad.exe? Do you tell your fat kids they can only have the crummy
games that come with their video games or plain dress that comes with
Barbie?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.5 and Gnu Privacy Guard <http://www.gnupg.org/>

iEYEARECAAYFAjliewwACgkQ4FjpJaPEp21R6ACgt3Qxo9dRBOQxCjh/AbVt3w/F
HYAAn1jeblFSn4R38VXEH57kD8ewqGAg
=n6O4
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <87puotqwa9.fsf@alderaan.maptel.es>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8jst1q$9eji12@SGI3651ef0.iddeo.es>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f86c8,d2370263c1326fa7
X-Google-Attributes: gidf86c8,public
From: Han Solo <hsolo@maptel.es>
Subject: Re: programar el cron para la tarifa ondulada de retrete
Date: 2000/07/05
Message-ID: <87puotqwa9.fsf@alderaan.maptel.es>
X-Deja-AN: 642480209
References: <8jst1q$9eji12@SGI3651ef0.iddeo.es>
Organization: The Rebel Alliance
X-Server-Date: 5 Jul 2000 00:02:23 GMT
Newsgroups: es.comp.os.linux.programacion