Re: [newbie] cron syntax question ?

2005-03-31 Thread RickSisler
frengoGorgia ([EMAIL PROTECTED]) wrote:
> Il ven, 2005-04-01 alle 02:19, RickSisler ha scritto:
[.snip.]

> * 0-23/2 * * * /home/ricks/bin/sigfile > /home/ricks/.signature
>
> seems to run the command every minute (the first *)
>
> you should put at least a minute of the hour (choose one below)
>
> 0 0-23/2 * * * /home/ricks/bin/sigfile > /home/ricks/.signature
> 9 0-23/2 * * * /home/ricks/bin/sigfile > /home/ricks/.signature
> 20 0-23/2 * * * /home/ricks/bin/sigfile > /home/ricks/.signature
> 45 0-23/2 * * * /home/ricks/bin/sigfile > /home/ricks/.signature
> 59 0-23/2 * * * /home/ricks/bin/sigfile > /home/ricks/.signature

[.snip.]
Yeah, thats fixed it, I went back and re-read the man page too,
seemed to indicate that in the examples ..

> regards,
> Francesco
Thanks for the help..

-- 
RickS
gpg --recv-keys --keyserver www.keyserver.net 0x24AABE61

"There's no I in failure... oh.. wait a minute... F, A,
I... Dammit!" -Joseph David Fiedler


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] cron syntax question ?

2005-03-31 Thread frengoGorgia
Il ven, 2005-04-01 alle 02:19, RickSisler ha scritto:
> Hi All,
> I have a bash script to generate a ~/.signature file that gets added
> to outgoing emails, as many do. I want it to run every 2 hours, but
> this runs it every minute, for some reason. I checked the man page for
> crontab(5) and it states to do it this way. Heres what I used:
> 
> * 0-23/2 * * * /home/ricks/bin/sigfile > /home/ricks/.signature
> 
> or even:
> 
> * */2 * * * /home/ricks/bin/sigfile > /home/ricks/.signature
> what would the proper syntax be ?
> 
> Thx for any replies.


* 0-23/2 * * * /home/ricks/bin/sigfile > /home/ricks/.signature

seems to run the command every minute (the first *)

you should put at least a minute of the hour (choose one below)

0 0-23/2 * * * /home/ricks/bin/sigfile > /home/ricks/.signature
9 0-23/2 * * * /home/ricks/bin/sigfile > /home/ricks/.signature
20 0-23/2 * * * /home/ricks/bin/sigfile > /home/ricks/.signature
45 0-23/2 * * * /home/ricks/bin/sigfile > /home/ricks/.signature
59 0-23/2 * * * /home/ricks/bin/sigfile > /home/ricks/.signature

maybe this reminder below could help you


#minute (0-59),#
#|  hour (0-23),   #
#|  |   day of the month (1-31),   #
#|  |   |   month of the year (1-12),  #
#|  |   |   |   day of the week (0-6 with 0=Sunday)#
#|  |   |   |   |   commands   #

30  01  *   *   *   /home/jim/bin/cleartmp



regards,
Francesco



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



[newbie] cron syntax question ?

2005-03-31 Thread RickSisler
Hi All,
I have a bash script to generate a ~/.signature file that gets added
to outgoing emails, as many do. I want it to run every 2 hours, but
this runs it every minute, for some reason. I checked the man page for
crontab(5) and it states to do it this way. Heres what I used:

* 0-23/2 * * * /home/ricks/bin/sigfile > /home/ricks/.signature

or even:

* */2 * * * /home/ricks/bin/sigfile > /home/ricks/.signature

Here's the output of syslog:

Mar 31 00:23:00 peace CROND[11704]: (ricks) CMD
(/home/ricks/bin/sigfile > /home/ricks/.signature)
Mar 31 00:24:01 peace CROND[11725]: (ricks) CMD
(/home/ricks/bin/sigfile > /home/ricks/.signature)
Mar 31 00:25:00 peace CROND[11746]: (ricks) CMD
(/home/ricks/bin/sigfile > /home/ricks/.signature)
Mar 31 00:26:01 peace CROND[11768]: (ricks) CMD
(/home/ricks/bin/sigfile > /home/ricks/.signature)
Mar 31 00:27:00 peace CROND[11812]: (ricks) CMD
(/home/ricks/bin/sigfile > /home/ricks/.signature)
Mar 31 00:28:01 peace CROND[11834]: (ricks) CMD
(/home/ricks/bin/sigfile > /home/ricks/.signature)
Mar 31 00:29:00 peace CROND[11856]: (ricks) CMD
(/home/ricks/bin/sigfile > /home/ricks/.signature)
Mar 31 00:30:00 peace CROND[11877]: (ricks) CMD
(/home/ricks/bin/sigfile > /home/ricks/.signature)
Mar 31 00:31:01 peace CROND[11897]: (ricks) CMD
(/home/ricks/bin/sigfile > /home/ricks/.signature)

what would the proper syntax be ?

Thx for any replies.
-- 
RickS
gpg --recv-keys --keyserver www.keyserver.net 0x24AABE61

"You don't have a quote from me... thank god" - Ken Vogt


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] cron job question

2004-11-26 Thread Chris
On Friday 26 November 2004 03:51 pm, Derek Jennings wrote:

> > Question:  How can I send these outputs to /var/spool/mail/chris
> > instead of through my isp?
>
> In /etc/crontab use
> MAILTO=chris
> instead of
> [EMAIL PROTECTED]
>
> derek

Thanks Derek, after I sent the msg I did some more googling and found thats 
how it should be, now to see if it will work.


-- 
Chris
Registered Linux User 283774 http://counter.li.org
4:00pm up 22 days, 20:28, 2 users, load average: 0.04, 0.08, 0.21

We are what we are.




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



[newbie] cron job question

2004-11-26 Thread Chris
A little background first.  I have a couple of cronjobs setup, one which 
shutsdown and restarts spamd ever 4hrs.  When this happens I get an email 
telling me it was done.  Yesterday I was fooling around with fetchmail to 
see if I could speed up the process of having mail processed by 
spamassassin without the lagtime seen when Kmail picks up the mail.  When 
my email from cron came in ref spamd it was marked as spam, not only that 
but it seems my ip is listed at sorbs.net now for some reason.  

*  2.0 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address.

I have several cronjobs setup besides this one that mail the output to me.  
The log output of rkhunter, and my daily run of sa-stats.  

Question:  How can I send these outputs to /var/spool/mail/chris instead of 
through my isp?

-- 
Chris
Registered Linux User 283774 http://counter.li.org
1:54pm up 22 days, 18:23, 3 users, load average: 0.02, 0.28, 0.34

... bleakness ... desolation ... plastic forks ...




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] cron job question

2004-11-26 Thread Derek Jennings
On Friday 26 November 2004 20:41, Chris wrote:
> A little background first.  I have a couple of cronjobs setup, one which
> shutsdown and restarts spamd ever 4hrs.  When this happens I get an email
> telling me it was done.  Yesterday I was fooling around with fetchmail to
> see if I could speed up the process of having mail processed by
> spamassassin without the lagtime seen when Kmail picks up the mail.  When
> my email from cron came in ref spamd it was marked as spam, not only that
> but it seems my ip is listed at sorbs.net now for some reason.
>
> *  2.0 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address.
>
> I have several cronjobs setup besides this one that mail the output to me.
> The log output of rkhunter, and my daily run of sa-stats.
>
> Question:  How can I send these outputs to /var/spool/mail/chris instead of
> through my isp?

In /etc/crontab use
MAILTO=chris
instead of
[EMAIL PROTECTED]

derek
-- 
www.jennings.homelinux.net
http://twiki.mdklinuxfaq.org


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-06 Thread German Guillot
On Thu, 5 Aug 2004 18:33:41 -0400, Bill Shirley <[EMAIL PROTECTED]> wrote:
> Did you see this post?  I'm not convinced you are
> exporting the DISPLAY variable.  Can you post your
> script?

 Yeah, I saw it. Sorry I didn't reply at the time, I was busy trying
out all sorts of things and a bit overwhelmed by the unexpected slew
of emails (for which thanks to everyone), and then it sort of got
buried under yet more contributions. I did try this too, and env |
grep DISPLAY gives me DISPLAY=:0.0

A script like:

#!/bin/bash
export DISPLAY=:0.0
/usr/bin/galeon http://www.google.com

with a crontab like:

SHELL=/bin/bash
MAILTO=ger
PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games:/usr/lib/jre-1.4.2_04/bin:/home/ger/bin

* * * * * /home/ger/bin/test

won't run from cron. Neither does simply * * * * * /usr/bin/galeon in
the crontab.

It works from the xterm, even after I run unset DISPLAY (if I omit the
"export" in the script above, after I unset DISPLAY I get the
following message at the xterm:
(galeon-bin:2613): Gtk-WARNING **: cannot open display:
I guess this is to be expected.)

I log in from run level 3 and type startx at the command line, but
that doesn't seem to change the behaviour.

Ah well, this is more complex than I'm ready for right now. I found a
workaround, where cron runs cat to update a file, setting it to 0 or
1. Then a background process reads that file and opens a galeon tab if
it finds a 1. It works, and I know why and how - good enough for the
moment. Now I want the script to read a file with several URLs and
check them one by one, just to see if I can. I'm trying to learn shell
scripting, basically, but you guys have so many ideas I can't keep up.

Thanks for all the help.

Germán.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-05 Thread Stephen Kühn
On Fri, 2004-08-06 at 05:47, German Guillot wrote:
> On Fri, 06 Aug 2004 03:25:10 +1000, Stephen Kühn <[EMAIL PROTECTED]> wrote:
> 
> > Now I'm led to wonder, are you using kcron to setup the cron job - and
> > is the user YOU or root or system?
> 
> I'm not using kcron - I don't even have it. In my home dir I have a
> text file called, appropriately (or confusingly) "crontab". I edit
> this by hand when I want to make changes, and then I run:
> 
> [EMAIL PROTECTED] ger]$ crontab crontab

Hmm...I always thought that /usr/bin/kcron was installed by deafult on
MDK 9+ systems...I don't recall having to specifically install it;
either which, I find it a faster and easier tool to do the same thing
(why reinvent the wheel?); and in so being, always maintains uncorrupted
crontab information (although it did muck up a few times PRIOR to
tweaking the IDE drives and a few other system params.)

> et voilà, the file /var/spool/cron/ger is updated and cron does as
> instructed, as long as you don't require it to use the X server. It's
> the user's crontab, but I've tried with with root's with the same
> result (ie, none).
> 
> For my little problem I've found a solution now. The script that cron
> runs checks my intended webpage and if it has changed since last time
> runs "cat status.1 > status", otherwise it runs "cat status.0 >
> status" (the content of status.1 is a 1, etc).
> 
> In the meantime I have a background process reading the file "status"
> at the same intervals as cron. If it finds a 0, it does nothing. If it
> finds a 1 it opens a Galeon tab. Solved!
> 
> I still don't know how you managed to make cron start Galeon directly,
> though. I'm using mdk10 OE, standard out of the box. I haven't messed
> with any configurations, I don't know enough for that yet. I guess
> you've got a few things tweaked there, haven't you? Oh man, so much to
> learn, so little time!
> 
> Germán.

I thought there was a panel applet for both Gnome and KDE that achieved
the same means - telling you when a particular website was
updated...Karamba and Superkaramba have "themes" that can do that (as
well as display them nicely on the root X window - I think that
gDesklets has features similar to that as well...)

stephen kuhn - proprietor
__
illawarra computer services :: a kuhn media australia venture
http://kma.0catch.com  :: mobile 0410.728.389
Serving Sydney, The Illawarra, South Coast and Rural NSW
__
  * This message was composed on a 100% Microsoft free computer *
  We expressly refuse to utilise Microsoft DRM encoded documents
__
  Mandrake GNU/Linux 10.0 OE/Kernel 2.6.3-7/ No Viruses here. 

Yes, but will I see the EASTER BUNNY in skintight leather at an IRON
MAIDEN concert?



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-05 Thread German Guillot
On Thu, 05 Aug 2004 12:58:40 -0500, Mikkel L. Ellertson
<[EMAIL PROTECTED]> wrote:
 
> As you say, running two X servers is overkill for what you want.  I am
> trying to remember something - there is a "dummy" X server package, or
> something like that, for faking an X server.  It may be part of the VNC
> package...  If I can remember enough to get a URL, or if I have time to
> go looking for it, I will post more.  Your problem has gotten more then
> one person on the list thinking in a new direction.  This is one of the
> reasions I am on the list!
> 

It's a great list, for sure. This thread is frankly OT and has been
running for I don't know how many emails, and nothing but interest and
help from you guys. I'm a little embarrassed of all the attention it's
got, but hey. It's a pleasure to be here, and a very useful one too.
Thanks so much!

Germán.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-05 Thread German Guillot
On Fri, 06 Aug 2004 03:25:10 +1000, Stephen Kühn <[EMAIL PROTECTED]> wrote:

> Now I'm led to wonder, are you using kcron to setup the cron job - and
> is the user YOU or root or system?

I'm not using kcron - I don't even have it. In my home dir I have a
text file called, appropriately (or confusingly) "crontab". I edit
this by hand when I want to make changes, and then I run:

[EMAIL PROTECTED] ger]$ crontab crontab

et voilà, the file /var/spool/cron/ger is updated and cron does as
instructed, as long as you don't require it to use the X server. It's
the user's crontab, but I've tried with with root's with the same
result (ie, none).

For my little problem I've found a solution now. The script that cron
runs checks my intended webpage and if it has changed since last time
runs "cat status.1 > status", otherwise it runs "cat status.0 >
status" (the content of status.1 is a 1, etc).

In the meantime I have a background process reading the file "status"
at the same intervals as cron. If it finds a 0, it does nothing. If it
finds a 1 it opens a Galeon tab. Solved!

I still don't know how you managed to make cron start Galeon directly,
though. I'm using mdk10 OE, standard out of the box. I haven't messed
with any configurations, I don't know enough for that yet. I guess
you've got a few things tweaked there, haven't you? Oh man, so much to
learn, so little time!

Germán.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-05 Thread Mikkel L. Ellertson
German Guillot wrote:
I'll check out xauth, though it seems a bit of overkill to have two X
servers running, just for this little toy. It'll teach me something
new, though.
I changed my run level to 3 and logged in again. I see that I own a
process called xinit, but top shows me that X is run by root (and
takes up 15% of my memory, which is why I'll try to make this work
with xauth, but just for homework. Even if it works, it's too heavy a
solution for such a small thing). Anyway, even with logging in from
level 3 the stuff I've been trying doesnt work.
Lynx would work, I guess. I hadn't thought of that.
Thank you for taking so much interest. I feel a little overwhelmed ;)
Germán.
 

I must be getting old - the X server itself has to have root permission 
to access the video hardware, so it will show as owned by root.  But 
access is normaly limmited to the user that starts it.  You can use 
xhost to let other users, or hosts, access the X server.  But this 
command has to be run by the user that is in control of the X server.

As you say, running two X servers is overkill for what you want.  I am 
trying to remember something - there is a "dummy" X server package, or 
something like that, for faking an X server.  It may be part of the VNC 
package...  If I can remember enough to get a URL, or if I have time to 
go looking for it, I will post more.  Your problem has gotten more then 
one person on the list thinking in a new direction.  This is one of the 
reasions I am on the list!

Mikkel
--
   Do not meddle in the affairs of dragons,
for you are crunchy and taste good with ketchup.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-05 Thread Stephen Kühn
On Fri, 2004-08-06 at 02:12, German Guillot wrote:

> Well, damnit. No, you're not missing anything, but I obviously am. I
> have a little script just like yours. I create a crontab with a task
> for it. It just doesn't work. Other scripts with other commands (cat,
> for example) are run by cron from my crontab, no problem. So it's not
> that I can't program a task in cron. It's not that I can't write a
> script to fire up a browser, that too works (run from the xterm).
> 
> The only thing I can think of is that your X configuration and mine
> are different, and mine doesn't allow me to do this. Got a lot more
> studying to do.
> 
> Germán.

Now I'm led to wonder, are you using kcron to setup the cron job - and
is the user YOU or root or system?

stephen kuhn - proprietor
__
illawarra computer services :: a kuhn media australia venture
http://kma.0catch.com  :: mobile 0410.728.389
Serving Sydney, The Illawarra, South Coast and Rural NSW
__
  * This message was composed on a 100% Microsoft free computer *
  We expressly refuse to utilise Microsoft DRM encoded documents
__
  Mandrake GNU/Linux 10.0 OE/Kernel 2.6.3-7/ No Viruses here. 

The individual choice of garnishment of a burger can be an important
point to the consumer in this day when individualism is an increasingly
important thing to people. -- Donald N. Smith, president of Burger King



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-05 Thread German Guillot
On Thu, 05 Aug 2004 10:47:57 -0500, Mikkel L. Ellertson
<[EMAIL PROTECTED]> wrote:

> The display manager will be running as root.  But when a suer logs in,
> it turns ownership over th the user.  If you use run level 3, then the
> user owns the X server from the start.  You can also do things like have
> more then one X server running at a time, each owned by a different
> user.  Access to each X server is controled by xauth.   There is an
> XAUTHORITY shell varable that points to the file containing the key.  It
> is possable to grant a program run by a different user access, but it is
> not simple.  Run "man xauth" and you will get an idea...
> 
> On the other hand, maybe you could use something like lynx, or wget to
> do what you are looking for?

I'll check out xauth, though it seems a bit of overkill to have two X
servers running, just for this little toy. It'll teach me something
new, though.

I changed my run level to 3 and logged in again. I see that I own a
process called xinit, but top shows me that X is run by root (and
takes up 15% of my memory, which is why I'll try to make this work
with xauth, but just for homework. Even if it works, it's too heavy a
solution for such a small thing). Anyway, even with logging in from
level 3 the stuff I've been trying doesnt work.

Lynx would work, I guess. I hadn't thought of that.

Thank you for taking so much interest. I feel a little overwhelmed ;)

Germán.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



RE: [newbie] Cron doesn't run for user

2004-08-05 Thread Bill Shirley
Do you set and export the DISPLAY variable?

>From an xterminal run:

env | grep DISPLAY

to see what it is set to.

I would think that if you do startx as root then
the crontab would have to be root's.

Also, if your cron job fails you should
get email.  Check that for errors.

Test your script.  Open an xterm and type:
unset DISPLAY

then run your script.  Does it work?

Bill

PS.  My run level is 3 not 5.

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of German Guillot
> Sent: Thursday, August 05, 2004 12:13 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [newbie] Cron doesn't run for user
>
>
> On Fri, 06 Aug 2004 01:42:10 +1000, Stephen Kühn <[EMAIL PROTECTED]> wrote:
>
> > Ok...just for giggles and grins, I just created a small script to fire
> > up Galeon (/home/stephen/bin/start_galeon) ::
> >
> > 
> > #!/bin/bash
> >
> > /usr/bin/galeon http://freshmeat.net
> >
> > exit
> > 
> >
> > Fired up kcron as myself, added the task, saved the task; fired up kcron
> > again and forced a run; worked like a charm; was I missing something
> > originally in the thread?
>
> Well, damnit. No, you're not missing anything, but I obviously am. I
> have a little script just like yours. I create a crontab with a task
> for it. It just doesn't work. Other scripts with other commands (cat,
> for example) are run by cron from my crontab, no problem. So it's not
> that I can't program a task in cron. It's not that I can't write a
> script to fire up a browser, that too works (run from the xterm).
>
> The only thing I can think of is that your X configuration and mine
> are different, and mine doesn't allow me to do this. Got a lot more
> studying to do.
>
> Germán.
>
>



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-05 Thread Mikkel L. Ellertson
Bill Shirley wrote:
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of German Guillot
Sent: Thursday, August 05, 2004 9:29 AM
To: [EMAIL PROTECTED]
Subject: Re: [newbie] Cron doesn't run for user
On Thu, 5 Aug 2004 08:29:16 -0400, Bill Shirley <[EMAIL PROTECTED]> wrote:
   

[EMAIL PROTECTED] tmp]# cat testg
#!/bin/sh
export DISPLAY=:0.0
echo $DISPLAY
/usr/bin/galeon
#/usr/bin/mozilla
Works for me!
 

Rats! I sure wish I could say the same. Just to be sure, do you mean
it's working as a cron job, opening a browser window at certain times?
Because that's what I can't get it to do. I can use the script to open
Galeon if I run it from an xterm, but that's it. I've tried putting it
in a crontab for root, I've tried logging in from run level 3 and then
typing startx (but the X process is still owned by root), no result.
I have got cron to do other things, but not this. It's like Mikkel said:
   

I bet it will not work from the command line if you are at the command
line interface, instead of the command line in an xterm.  Any command
that needs X to run will NOT work in a cron job.  This is because it can
not connect to an X server - at least not with the default security
settings.  It is not a good idea to change the settings to allow this,
unless you are on an isulated machine.  (I remember playing tricks on
people running an open X server...)  ;)
 

So do you have your security settings tweaked to allow you to connect
to the X server? Because what he says there seems to fit the behaviour
on my system exactly, and I'd decided it wasn't worth compromising
security for this. But I'm also pretty sure that there must be a
workaround (or maybe I'm just mule-headed).
Germán.
   

Works from a cron job:
44 11 * * * /root/tmp/tmp/testg
Here is my setup:
I have vncserver running on my server.  I open root's desktop with vncviewer
from another PC.  From the same "another PC", I ssh in and can run the
script which starts galeon and the window opens in vncviewer.  (I only use
the real console in emergencies.)  The ssh terminal does not have the
environment variable DISPLAY set;  thus emulating the environment of cron
jobs.
This setup also works if the script is run from cron.  I tested it here.
I'm not sure what you guys are talking about when you say security settings.
The "another PC" is on my local LAN and the server allows a connection.
[EMAIL PROTECTED] tmp]# cat testg
#!/bin/sh
export DISPLAY=:0.0
echo $DISPLAY
/usr/bin/galeon
#/usr/bin/mozilla
Root gets an email from the echo command which reads:
:0.0
HTH,
Bill
 

Running a VNC server is a bit different from running an X server.  I 
have not looked at the security settings for the VNC server.  The VNC 
server takes the place of the normal X server, so the settings of the 
VNC server determine what programs can connect.

My experence in using ssh with X has been slightly different - I use ssh 
to run a program on a remote machine, and have it connect to the X 
server on my machine.  With ssh set to forward the X connection, the 
local X server thinks I am running a program on the local machine.  If I 
am running X localy, it works better then VNC for me.  I usualy do not 
need the remote window manager.  If I do, then I start it in and Xnest 
window on my normal desktop.

Mikkel
--
   Do not meddle in the affairs of dragons,
for you are crunchy and taste good with ketchup.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-05 Thread German Guillot
On Fri, 06 Aug 2004 01:42:10 +1000, Stephen Kühn <[EMAIL PROTECTED]> wrote:
 
> Ok...just for giggles and grins, I just created a small script to fire
> up Galeon (/home/stephen/bin/start_galeon) ::
> 
> 
> #!/bin/bash
> 
> /usr/bin/galeon http://freshmeat.net
> 
> exit
> 
> 
> Fired up kcron as myself, added the task, saved the task; fired up kcron
> again and forced a run; worked like a charm; was I missing something
> originally in the thread?

Well, damnit. No, you're not missing anything, but I obviously am. I
have a little script just like yours. I create a crontab with a task
for it. It just doesn't work. Other scripts with other commands (cat,
for example) are run by cron from my crontab, no problem. So it's not
that I can't program a task in cron. It's not that I can't write a
script to fire up a browser, that too works (run from the xterm).

The only thing I can think of is that your X configuration and mine
are different, and mine doesn't allow me to do this. Got a lot more
studying to do.

Germán.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



RE: [newbie] Cron doesn't run for user

2004-08-05 Thread Bill Shirley


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of German Guillot
> Sent: Thursday, August 05, 2004 9:29 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [newbie] Cron doesn't run for user
>
>
> On Thu, 5 Aug 2004 08:29:16 -0400, Bill Shirley <[EMAIL PROTECTED]> wrote:
> > [EMAIL PROTECTED] tmp]# cat testg
> > #!/bin/sh
> >
> > export DISPLAY=:0.0
> >
> > echo $DISPLAY
> >
> > /usr/bin/galeon
> >
> > #/usr/bin/mozilla
> >
> > Works for me!
> >
>
> Rats! I sure wish I could say the same. Just to be sure, do you mean
> it's working as a cron job, opening a browser window at certain times?
> Because that's what I can't get it to do. I can use the script to open
> Galeon if I run it from an xterm, but that's it. I've tried putting it
> in a crontab for root, I've tried logging in from run level 3 and then
> typing startx (but the X process is still owned by root), no result.
>
> I have got cron to do other things, but not this. It's like Mikkel said:
>
> > I bet it will not work from the command line if you are at the command
> > line interface, instead of the command line in an xterm.  Any command
> > that needs X to run will NOT work in a cron job.  This is because it can
> > not connect to an X server - at least not with the default security
> > settings.  It is not a good idea to change the settings to allow this,
> > unless you are on an isulated machine.  (I remember playing tricks on
> > people running an open X server...)  ;)
>
> So do you have your security settings tweaked to allow you to connect
> to the X server? Because what he says there seems to fit the behaviour
> on my system exactly, and I'd decided it wasn't worth compromising
> security for this. But I'm also pretty sure that there must be a
> workaround (or maybe I'm just mule-headed).
>
> Germán.
>
>

Works from a cron job:
44 11 * * * /root/tmp/tmp/testg

Here is my setup:
I have vncserver running on my server.  I open root's desktop with vncviewer
from another PC.  From the same "another PC", I ssh in and can run the
script which starts galeon and the window opens in vncviewer.  (I only use
the real console in emergencies.)  The ssh terminal does not have the
environment variable DISPLAY set;  thus emulating the environment of cron
jobs.

This setup also works if the script is run from cron.  I tested it here.

I'm not sure what you guys are talking about when you say security settings.

The "another PC" is on my local LAN and the server allows a connection.

[EMAIL PROTECTED] tmp]# cat testg
#!/bin/sh

export DISPLAY=:0.0
echo $DISPLAY

/usr/bin/galeon
#/usr/bin/mozilla

Root gets an email from the echo command which reads:
:0.0

HTH,

Bill



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-05 Thread Mikkel L. Ellertson
Bill Shirley wrote:
 [EMAIL PROTECTED] tmp]# cat testg #!/bin/sh
 export DISPLAY=:0.0
 echo $DISPLAY
 /usr/bin/galeon
 #/usr/bin/mozilla
 Works for me!
 Bill
Are you running X as the same user?  If user bill logs in to the DM, or 
runs startx, user joe can not connect to the X server without a LOT more 
work then this.  (User root will also get an error when trying to 
connect...)  This can be changed using the xhost command.  (USE WITH 
CAUTION!)  The xhost command MUST be run by the user "owning" the X server.

Mikkel
--
   Do not meddle in the affairs of dragons,
for you are crunchy and taste good with ketchup.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-05 Thread Mikkel L. Ellertson
German Guillot wrote:
On Wed, 04 Aug 2004 20:22:44 -0500, Mikkel L. Ellertson
<[EMAIL PROTECTED]> wrote:
 

Bill Shirley wrote:
   

Try putting in the script:
DISPLAY=:0.0
at the top after #!/bin/sh
HTH, Bill
 

This only works if you are running the X server.  If another user is
running X, you will not be able to connect to the X server, unless you
turn off security.  It also fails if you are not running an X server.
Also, if you are running more then one X server, the DISPLAY setting may
be different for "your" X server.
   

The thing is, the X server is running, but the owner is root. Should
that be so? I have the machine set to boot to run level 5, and then I
log in from there. If I booted to run level 3, logged in, and _then_
started X, would I own the server process? I wonder if it would work
if I made the cron entry in root's crontab, and put the script in
cron's path. I'll try that now, just to see, though I'm not too sure I
want root to run wget and galeon regularly. I don't know nuttin', but
it somehow seems like a risky practice to me.
On the other hand, this seems like a limitation that should have a
workaround without compromising security. If I can run the script
while I'm logged in to an x session, but not from cron, it means cron
is using a different session, all it's own. Isn't there a way to
instruct cron that a command must be run from the active session of
the user whose crontab it is? That sounds reasonable, no?
More to investigate. What fun!
Germán.
 

The display manager will be running as root.  But when a suer logs in, 
it turns ownership over th the user.  If you use run level 3, then the 
user owns the X server from the start.  You can also do things like have 
more then one X server running at a time, each owned by a different 
user.  Access to each X server is controled by xauth.   There is an 
XAUTHORITY shell varable that points to the file containing the key.  It 
is possable to grant a program run by a different user access, but it is 
not simple.  Run "man xauth" and you will get an idea...

On the other hand, maybe you could use something like lynx, or wget to 
do what you are looking for?

Mikkel
--
   Do not meddle in the affairs of dragons,
for you are crunchy and taste good with ketchup.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-05 Thread Stephen Kühn
On Fri, 2004-08-06 at 01:20, German Guillot wrote:
> On Fri, 06 Aug 2004 01:06:05 +1000, Stephen Kühn <[EMAIL PROTECTED]> wrote:
> 
> > Maybe I walked in late in the thread here - but I'm trying to NOW figure
> > out what y'all tryin to do - is it that you want cron to open a browser
> > for you for a specific URL and that's all?
> 
> Yep, that's it. I'm starting to feel a little embarrassed that the
> thread has run so long, this being OT and all. But basically that's
> the object of the exercise. I'm really just trying my hand out at
> scripting, and learning loads trying to solve this little problem.
> 
> If you have any ideas, they're most welcome!
> 
> Germán.

Ok...just for giggles and grins, I just created a small script to fire
up Galeon (/home/stephen/bin/start_galeon) ::


#!/bin/bash

/usr/bin/galeon http://freshmeat.net

exit


Fired up kcron as myself, added the task, saved the task; fired up kcron
again and forced a run; worked like a charm; was I missing something
originally in the thread?

stephen kuhn - proprietor
__
illawarra computer services :: a kuhn media australia venture
http://kma.0catch.com  :: mobile 0410.728.389
Serving Sydney, The Illawarra, South Coast and Rural NSW
__
  * This message was composed on a 100% Microsoft free computer *
  We expressly refuse to utilise Microsoft DRM encoded documents
__
  Mandrake GNU/Linux 10.0 OE/Kernel 2.6.3-7/ No Viruses here. 

Support bacteria -- it's the only culture some people have!



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-05 Thread German Guillot
On Fri, 06 Aug 2004 01:06:05 +1000, Stephen Kühn <[EMAIL PROTECTED]> wrote:

> Maybe I walked in late in the thread here - but I'm trying to NOW figure
> out what y'all tryin to do - is it that you want cron to open a browser
> for you for a specific URL and that's all?

Yep, that's it. I'm starting to feel a little embarrassed that the
thread has run so long, this being OT and all. But basically that's
the object of the exercise. I'm really just trying my hand out at
scripting, and learning loads trying to solve this little problem.

If you have any ideas, they're most welcome!

Germán.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-05 Thread Stephen Kühn
On Fri, 2004-08-06 at 00:54, German Guillot wrote:
> On Thu, 5 Aug 2004 09:18:36 -0500, Hoyt Bailey <[EMAIL PROTECTED]> wrote:
> >
> > You might try:
> > '/usr/bin/galeon weather.com' (or whatever site you want)
> 
> Yeah, tried that too. I think I've tried everything short of changing
> security settings in the X server,  but I'm not going down that route.
> Anyway, I've learnt about cron, I've learnt a bit about shell
> scripting, and that's all good. I can't open a browser window
> directly, but I'll find other ways of getting a notification. After
> all if I'm running X anyway, I can always click on a bookmark.
> 
> Or... leave a process running which reads a file, which cron updates.
> When the file reads 1, the running process opens a window. When the
> file reads 0, do nothing. Hm! Gonna try that.
> 
> Germán.

Maybe I walked in late in the thread here - but I'm trying to NOW figure
out what y'all tryin to do - is it that you want cron to open a browser
for you for a specific URL and that's all?

stephen kuhn - proprietor
__
illawarra computer services :: a kuhn media australia venture
http://kma.0catch.com  :: mobile 0410.728.389
Serving Sydney, The Illawarra, South Coast and Rural NSW
__
  * This message was composed on a 100% Microsoft free computer *
  We expressly refuse to utilise Microsoft DRM encoded documents
__
  Mandrake GNU/Linux 10.0 OE/Kernel 2.6.3-7/ No Viruses here. 

Electricity is actually made up of extremely tiny particles, called
electrons, that you cannot see with the naked eye unless you have been
drinking. Electrons travel at the speed of light, which in most American
homes is 110 volts per hour. This is very fast. In the time it has taken
you to read this sentence so far, an electron could have traveled all
the way from San Francisco to Hackensack, New Jersey, although God alone
knows why it would want to. The five main kinds of electricity are
alternating current, direct current, lightning, static, and European.
Most American homes have alternating current, which means that the
electricity goes in one direction for a while, then goes in the other
direction. This prevents harmful electron buildup in the wires. -- Dave
Barry, "The Taming of the Screw"



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-05 Thread German Guillot
On Thu, 5 Aug 2004 09:18:36 -0500, Hoyt Bailey <[EMAIL PROTECTED]> wrote:
>
> You might try:
> '/usr/bin/galeon weather.com' (or whatever site you want)

Yeah, tried that too. I think I've tried everything short of changing
security settings in the X server,  but I'm not going down that route.
Anyway, I've learnt about cron, I've learnt a bit about shell
scripting, and that's all good. I can't open a browser window
directly, but I'll find other ways of getting a notification. After
all if I'm running X anyway, I can always click on a bookmark.

Or... leave a process running which reads a file, which cron updates.
When the file reads 1, the running process opens a window. When the
file reads 0, do nothing. Hm! Gonna try that.

Germán.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-05 Thread German Guillot
On Wed, 04 Aug 2004 20:22:44 -0500, Mikkel L. Ellertson
<[EMAIL PROTECTED]> wrote:
> Bill Shirley wrote:
> 
> >  Try putting in the script:
> >
> >  DISPLAY=:0.0
> >
> >  at the top after #!/bin/sh
> >
> >  HTH, Bill
> >
> This only works if you are running the X server.  If another user is
> running X, you will not be able to connect to the X server, unless you
> turn off security.  It also fails if you are not running an X server.
> Also, if you are running more then one X server, the DISPLAY setting may
> be different for "your" X server.

The thing is, the X server is running, but the owner is root. Should
that be so? I have the machine set to boot to run level 5, and then I
log in from there. If I booted to run level 3, logged in, and _then_
started X, would I own the server process? I wonder if it would work
if I made the cron entry in root's crontab, and put the script in
cron's path. I'll try that now, just to see, though I'm not too sure I
want root to run wget and galeon regularly. I don't know nuttin', but
it somehow seems like a risky practice to me.

On the other hand, this seems like a limitation that should have a
workaround without compromising security. If I can run the script
while I'm logged in to an x session, but not from cron, it means cron
is using a different session, all it's own. Isn't there a way to
instruct cron that a command must be run from the active session of
the user whose crontab it is? That sounds reasonable, no?

More to investigate. What fun!

Germán.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-05 Thread German Guillot
On Wed, 04 Aug 2004 20:14:21 -0500, Mikkel L. Ellertson
<[EMAIL PROTECTED]> wrote:

> Or you script can start something like:
> 
> #!/bin/bash
> #
> PATH=/bin;/usr/bin;/home/ger/bin
> 
> Another way you can do it is to define variables for all your commands
> at the start of the script, and then use the variable where you would
> use the command.
> 
> MYCOMMAND=/home/ger/bin/command
> INFILE=/home/ger/infile.txt
> OUTFILE=/home/ger/outfile.txt
> 
> $MYCOMMAND  <$INFINE >$OUTFILE

Those are all good tips. I'm starting to learn shell scripting, so
I'll keep them in mind. Thanks!

Germán.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-05 Thread German Guillot
On Wed, 4 Aug 2004 17:57:55 -0400, Bill Shirley <[EMAIL PROTECTED]> wrote:
> Try putting in the script:
> 
> DISPLAY=:0.0
> 
> at the top after #!/bin/sh

Thanks for the suggestion. It desn't work, though, unfortunately.

Germán.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-04 Thread Mikkel L. Ellertson
Bill Shirley wrote:
 Try putting in the script:
 DISPLAY=:0.0
 at the top after #!/bin/sh
 HTH, Bill
This only works if you are running the X server.  If another user is 
running X, you will not be able to connect to the X server, unless you 
turn off security.  It also fails if you are not running an X server.
Also, if you are running more then one X server, the DISPLAY setting may 
be different for "your" X server.

Mikkel
--
   Do not meddle in the affairs of dragons,
for you are crunchy and taste good with ketchup.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-04 Thread Mikkel L. Ellertson
German Guillot wrote:
> I find specifing the path the script expects in the script itself
> cuts way down on problems, especialy if you later change your path
> from what it was when you wrote the script. You can usualy depend
> on /bin;/usr/sbin, but anything else depends on how the script is
> being run.
 Hm. With a script such as:
 #!/bin/bash cat /home/ger/test.1 >> /home/ger/test.2
 you mean I should write:
 #!/bin/bash /bin/cat /home/ger/test.1 >> /home/ger/test.2
Or you script can start something like:
#!/bin/bash
#
PATH=/bin;/usr/bin;/home/ger/bin
Another way you can do it is to define variables for all your commands 
at the start of the script, and then use the variable where you would 
use the command.

MYCOMMAND=/home/ger/bin/command
INFILE=/home/ger/infile.txt
OUTFILE=/home/ger/outfile.txt
$MYCOMMAND  <$INFINE >$OUTFILE
 right? Well, darn it, yes! I just tried it (that very example with
 cat, which was not working either) and now it works. That was really
 mystifying me, because I reckoned cat should always work. Of course
 it does.
Mikkel
--
   Do not meddle in the affairs of dragons,
for you are crunchy and taste good with ketchup.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



RE: [newbie] Cron doesn't run for user

2004-08-04 Thread Bill Shirley
Try putting in the script:

DISPLAY=:0.0

at the top after #!/bin/sh

HTH,
Bill


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of German Guillot
> Sent: Wednesday, August 04, 2004 4:43 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [newbie] Cron doesn't run for user
>
>
> On Wed, 04 Aug 2004 15:07:43 -0500, Mikkel L. Ellertson
> <[EMAIL PROTECTED]> wrote:
>
> > > Yep, I did that. I tried PATH=/home/ger/bin and when that didn't work
> > >  PATH=/bin:/usr/bin:/usr/bin/X11: etc, the whole bash environment
> > > variable.
> > >
> > Did you add the full path in the script, or in the crontab entry?
>
> I added it only in the crontab entry, both in the PATH variable and in
> the line to be executed.
>
> > I find specifing the path the script expects in the script itself cuts way
> > down on problems, especialy if you later change your path from what it
> > was when you wrote the script.  You can usualy depend on /bin;/usr/sbin,
> > but anything else depends on how the script is being run.
>
> Hm. With a script such as:
>
> #!/bin/bash
> cat  /home/ger/test.1 >> /home/ger/test.2
>
> you mean I should write:
>
> #!/bin/bash
> /bin/cat  /home/ger/test.1 >> /home/ger/test.2
>
> right? Well, darn it, yes! I just tried it (that very example with
> cat, which was not working either) and now it works.  That was really
> mystifying me, because I reckoned cat should always work. Of course it
> does.
>
>
> > > Just to see, I made another script to open a browser window. All it
> > > has is this:
> > >
> > > #!/bin/bash galeon
> > >
> > > It's called /home/ger/bin/gal and works from the command line. But
> > > not from cron. Those things you point out might be the reason... I'll
> > > use a command that always works and check it. Any suggestions?
> > >
> > I bet it will not work from the command line if you are at the command
> > line interface, instead of the command line in an xterm.  Any command
> > that needs X to run will NOT work in a cron job.  This is because it can
> > not connect to an X server - at least not with the default security
> > settings.  It is not a good idea to change the settings to allow this,
> > unless you are on an isulated machine.  (I remember playing tricks on
> > people running an open X server...)  ;)
>
> Right again! :) If I try to run my little "program" gal from a login
> shell and not an xterm, I get and error message:
>
> [EMAIL PROTECTED] ger]$ gal
> (galeon-bin: 13165): Gtk-WARNING **: cannot open display:
>
>
> > I hope this helps...
>
> It does indeed, thank you. All the mysteries have been explained. I
> still can't do what I was trying to do, but now I know why. It was
> only to learn, so I can count the whole thing a success after all.
>
> Thank you again.
>
> Germán.
>
>



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-04 Thread German Guillot
On Wed, 04 Aug 2004 15:07:43 -0500, Mikkel L. Ellertson
<[EMAIL PROTECTED]> wrote:

> > Yep, I did that. I tried PATH=/home/ger/bin and when that didn't work
> >  PATH=/bin:/usr/bin:/usr/bin/X11: etc, the whole bash environment
> > variable.
> > 
> Did you add the full path in the script, or in the crontab entry?

I added it only in the crontab entry, both in the PATH variable and in
the line to be executed.

> I find specifing the path the script expects in the script itself cuts way
> down on problems, especialy if you later change your path from what it
> was when you wrote the script.  You can usualy depend on /bin;/usr/sbin,
> but anything else depends on how the script is being run.

Hm. With a script such as:

#!/bin/bash
cat  /home/ger/test.1 >> /home/ger/test.2

you mean I should write:

#!/bin/bash
/bin/cat  /home/ger/test.1 >> /home/ger/test.2

right? Well, darn it, yes! I just tried it (that very example with
cat, which was not working either) and now it works.  That was really
mystifying me, because I reckoned cat should always work. Of course it
does.


> > Just to see, I made another script to open a browser window. All it
> > has is this:
> >
> > #!/bin/bash galeon
> >
> > It's called /home/ger/bin/gal and works from the command line. But
> > not from cron. Those things you point out might be the reason... I'll
> > use a command that always works and check it. Any suggestions?
> > 
> I bet it will not work from the command line if you are at the command
> line interface, instead of the command line in an xterm.  Any command
> that needs X to run will NOT work in a cron job.  This is because it can
> not connect to an X server - at least not with the default security
> settings.  It is not a good idea to change the settings to allow this,
> unless you are on an isulated machine.  (I remember playing tricks on
> people running an open X server...)  ;)

Right again! :) If I try to run my little "program" gal from a login
shell and not an xterm, I get and error message:

[EMAIL PROTECTED] ger]$ gal
(galeon-bin: 13165): Gtk-WARNING **: cannot open display:


> I hope this helps...

It does indeed, thank you. All the mysteries have been explained. I
still can't do what I was trying to do, but now I know why. It was
only to learn, so I can count the whole thing a success after all.

Thank you again.

Germán.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-04 Thread Mikkel L. Ellertson
German Guillot wrote:
On Wed, 04 Aug 2004 11:34:36 -0500, Mikkel L. Ellertson 
<[EMAIL PROTECTED]> wrote:


You might want to try adding a PATH= before
the first command in the script.

Yep, I did that. I tried PATH=/home/ger/bin and when that didn't work
 PATH=/bin:/usr/bin:/usr/bin/X11: etc, the whole bash environment 
variable.

Did you add the full path in the script, or in the crontab entry?  I 
find specifing the path the script expects in the script itself cuts way 
down on problems, especialy if you later change your path from what it 
was when you wrote the script.  You can usualy depend on /bin;/usr/sbin, 
but anything else depends on how the script is being run.

I am not sure how you added the path to the crontab entry, but it
doesn't sound like your script is using it.

I created a file in my home dir called "crontab", and then did
crontab crontab. The new generated file appeared as
/var/spool/cron/ger, and crontab -l showed its contents properly.

If it is using the default path, then it will not find any programs
that are not in /bin or /usr/bin.  A couple of other things to be
carefull of
- some programs do not work well if you do not have an active
ternimal. - when run by crontab, you have a very limmited set of
varables set.

Just to see, I made another script to open a browser window. All it
has is this:
#!/bin/bash galeon
It's called /home/ger/bin/gal and works from the command line. But
not from cron. Those things you point out might be the reason... I'll
use a command that always works and check it. Any suggestions?
I bet it will not work from the command line if you are at the command 
line interface, instead of the command line in an xterm.  Any command 
that needs X to run will NOT work in a cron job.  This is because it can 
not connect to an X server - at least not with the default security 
settings.  It is not a good idea to change the settings to allow this, 
unless you are on an isulated machine.  (I remember playing tricks on 
people running an open X server...)  ;)

If you would post your crontab entry, and your script, we may be
able to give you more specific help.  (Any error mail from crontab
also...)

[EMAIL PROTECTED] ger]$ crontab -l # DO NOT EDIT THIS FILE - edit the
master and reinstall. # (crontab installed on Wed Aug  4 18:50:32
2004) # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37
vixie Exp $) SHELL=/bin/bash MAILTO=ger 
PATH=/bin:/usr/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/local/bin:/opt/X11R6/bin:/usr/bin:/usr/games:/usr/lib/jre-1.4.2_04/bin:/home/ger/bin

*/15 * * * * /home/ger/bin/gal
That's the current content. Tha actual script I'm trying to run is an
 adaptation of Todd Slater's recently posted script to check a web
page for new content. The only differences being that wget reads my
galeon cookie file (it's a site that requires login) and that if
there is any change Galeon opens a tab in the background. As I said,
from the command line it works.
Incidentally, about the mail. I've been looking for it, but I didn't 
want to ask different kinds of questions in the same email. The 
directory /var/spool/mail/ is empty and there's no mail-related stuff
 in my home dir. I've never yet read system mail so I don't know if 
there's a deamon that should be running and isn't, or something.

Anyway, good pointers there, I'll try with other simple commands to 
see what happens. Thanks a lot.

Germán.
I hope this helps...
Mikkel
--
  Do not meddle in the affairs of dragons,
for you are crunchy and taste good with Ketchup!

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-04 Thread German Guillot
On Wed, 04 Aug 2004 11:34:36 -0500, Mikkel L. Ellertson
<[EMAIL PROTECTED]> wrote:
 
> You might want to try adding a PATH= before the
> first command in the script.

Yep, I did that. I tried PATH=/home/ger/bin and when that didn't work
PATH=/bin:/usr/bin:/usr/bin/X11: etc, the whole bash environment
variable.

>  I am not sure how you added the path to
> the crontab entry, but it doesn't sound like your script is using it.

I created a file in my home dir called "crontab", and then did crontab
crontab. The new generated file appeared as /var/spool/cron/ger, and
crontab -l showed its contents properly.

> If it is using the default path, then it will not find any programs that
> are not in /bin or /usr/bin.  A couple of other things to be carefull of
> 
> - some programs do not work well if you do not have an active ternimal.
> - when run by crontab, you have a very limmited set of varables set.

Just to see, I made another script to open a browser window. All it has is this:

#!/bin/bash
galeon

It's called /home/ger/bin/gal and works from the command line. But not
from cron. Those things you point out might be the reason... I'll use
a command that always works and check it. Any suggestions?


> 
> If you would post your crontab entry, and your script, we may be able to
> give you more specific help.  (Any error mail from crontab also...)

[EMAIL PROTECTED] ger]$ crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (crontab installed on Wed Aug  4 18:50:32 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
SHELL=/bin/bash
MAILTO=ger
PATH=/bin:/usr/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/local/bin:/opt/X11R6/bin:/usr/bin:/usr/games:/usr/lib/jre-1.4.2_04/bin:/home/ger/bin

*/15 * * * * /home/ger/bin/gal

That's the current content. Tha actual script I'm trying to run is an
adaptation of Todd Slater's recently posted script to check a web page
for new content. The only differences being that wget reads my galeon
cookie file (it's a site that requires login) and that if there is any
change Galeon opens a tab in the background. As I said, from the
command line it works.

Incidentally, about the mail. I've been looking for it, but I didn't
want to ask different kinds of questions in the same email. The
directory /var/spool/mail/ is empty and there's no mail-related stuff
in my home dir. I've never yet read system mail so I don't know if
there's a deamon that should be running and isn't, or something.

Anyway, good pointers there, I'll try with other simple commands to
see what happens. Thanks a lot.

Germán.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



RE: [newbie] Cron doesn't run for user

2004-08-04 Thread Tony S. Sykes
Have you got your scripts path explicit in the crontab?

Tony.

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of German Guillot
> Sent: Wednesday, August 04, 2004 4:02 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [newbie] Cron doesn't run for user
> 
> 
> On Wed, 4 Aug 2004 10:07:58 -0400, JoeHill 
> <[EMAIL PROTECTED]> wrote:
> 
> > I was having the same problem, turned out it was that in 
> the crontab entry I did
> > not put the full path the script. Even though it was in 
> *my* PATH, cron still
> > needed the full directions.
> 
> Thanks Joe. I had it like that to start with, and it didn't work.
> That's when I added the path to the script in the crontab PATH
> variable. Still no banana. So I added my whole path, just in case it
> needed it for the commands in the script. Nyet. I'm all confused. By
> rights it _should_ work.
> 
> Starting to lose my sense of humour here - better go brew 
> some caffeine.
> 
> GermÃn.
> 
> 


-+-+-+-+-+-+-+-+-+ Business Computer Projects - Disclaimer -+-+-+-+-+-+-+-+-+-
This message, and any associated attachment is confidential.  If you have received
it in error, please delete it from your system, do not use or disclose the information
in any way, and notify either the sender or [EMAIL PROTECTED] immediately.
The contents of this message may contain personal views which are not necessarily 
the views of Business Computer Projects Ltd., unless specifically stated.  Whilst every
effort has been made to ensure that emails and their attachments are virus free, it is 
the responsibility of the recipient(s) to verify the integrity of such emails.
Business Computer Projects Ltd
BCP House
151 Charles Street
Stockport
Cheshire
SK1 3JY
Tel: +44 (0)161 355-3000
Fax: +44 (0)161 355-3001
Web: http://www.bcpsoftware.com


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron doesn't run for user

2004-08-04 Thread Mikkel L. Ellertson
German Guillot wrote:
Hello All,
I'm on mdk 10 OE. I've put a little bash script in /home/ger/bin/,
added that directory to my path, created a crontab for myself with
crontab (it's now /var/spool/cron/ger), added my whole $PATH to it,
created /etc/cron.allow and even /var/spool/cron/cron.allow with my
user name in it, restarted cron with /etc/rc5.d/S90crond restart (even
though I don't think that's even necessary), the woiks. I even added a
line to /etc/crontab (now removed). I've read all I can find on cron,
and it should be running my script.
Well, it an't.
The script works, I can run it from the command line. But I don't want
that, I need it to work at specified times on it's own. What am I
missing?
Thanks for your help,
Germán.
You might want to try adding a PATH= before the 
first command in the script.  I am not sure how you added the path to 
the crontab entry, but it doesn't sound like your script is using it. 
If it is using the default path, then it will not find any programs that 
are not in /bin or /usr/bin.  A couple of other things to be carefull of

- some programs do not work well if you do not have an active ternimal.
- when run by crontab, you have a very limmited set of varables set.
If you would post your crontab entry, and your script, we may be able to 
give you more specific help.  (Any error mail from crontab also...)

Mikkel
--
  Do not meddle in the affairs of dragons,
for you are crunchy and taste good with Ketchup!

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



[newbie] Cron doesn't run for user

2004-08-04 Thread German Guillot
Hello All,

I'm on mdk 10 OE. I've put a little bash script in /home/ger/bin/,
added that directory to my path, created a crontab for myself with
crontab (it's now /var/spool/cron/ger), added my whole $PATH to it,
created /etc/cron.allow and even /var/spool/cron/cron.allow with my
user name in it, restarted cron with /etc/rc5.d/S90crond restart (even
though I don't think that's even necessary), the woiks. I even added a
line to /etc/crontab (now removed). I've read all I can find on cron,
and it should be running my script.

Well, it an't.

The script works, I can run it from the command line. But I don't want
that, I need it to work at specified times on it's own. What am I
missing?

Thanks for your help,
Germán.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] Cron

2004-01-31 Thread Dan Gordon
On Sat, 31 Jan 2004 17:59:20 -0800 (PST)
Job Evers wrote:

> Argh.  Why doth my cron not work like I want it to?
> 
> I have the following set up as an alarm to go off at
> 630 AM.  The .alarm script works when I run it from
> the command line.
> 
> $ more .alarm:
> #!/bin/sh
> xmms /home/jobevers/.playlist.pls
> 
> $ crontab -l
> SHELL=/bin/bash
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> MAILTO=jobevers
> HOME=/home/jobevers
> # run-parts
> 30 6 * * */home/jobevers/.alarm
> 
> But, 630 rolls around and nothing happens (fortunately
> I had another alarm set).
> 
> In frustration, I added a new entry in my cron tab:
> * * * * * /home/jobevers/test
> 
> $ more test
> #!/bin/sh
> echo "This is a test" >> /home/jobevers/cron.test
> 
> and frustratingly enough that worked fine!
> 
> Is there something about xmms that I can't run a cron
> job with it?
> 
 
I cant answer a cron specific question, but there is a xmms plugin
called xmms alarm that sounds like what you want to do.
HTH
Regards,
Dan Gordon

-- 
Sat Jan 31 23:42:45 EST 2004
 23:42:45 up 23:17,  1 user,  load average: 0.33, 0.21, 0.12
 ___ 
( We're all looking for a woman who can )
( sit in a mini-skirt and talk  )
( philosophy, executing both with   )
( confidence and style. )
 --- 
o   ^__^
 o  (OO)\___
(__)\   )\/\
||w |
|| ||

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] Cron

2003-11-28 Thread Derek Jennings
On Friday 28 Nov 2003 1:41 am, Trevor Rhodes wrote:
> Hello,
>
> Can someone tell me where Cron from MCC went?  I need it back.  Thanks
>
As I understand it. It was taken out because it did not work properly.

Try webmin instead. It does all that drakcron did and lots more.

Install webmin RPM then point your browser to 
https://localhost:1

derek
-- 
--
www.jennings.homelinux.net
http://twiki.mdklinuxfaq.org


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


[newbie] Cron

2003-11-27 Thread Trevor Rhodes
Hello,

Can someone tell me where Cron from MCC went?  I need it back.  Thanks

 Regards
  Trevor Rhodes
===
Powered by Linux- Mandrake 9.1
Registered Linux user # 290542 at http://counter.li.org
Registered Machine #'s 186951
Mandrake Club Silver Member
Source :  my 100 % Microsoft-free personal computer.
===
 12:40:44 up 11:20,  1 user,  load average: 0.05, 0.05, 0.05
-- 
Never mud wrestle with a pig.. you get dirty and the pig enjoys it!
Never try to teach a pig to dance. You waste your time and annoy the pig.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] cron error

2003-10-07 Thread L.V.Gandhi
On Wednesday 01 Oct 2003 3:04 pm, Derek Jennings wrote:
> On Wednesday 01 Oct 2003 1:13 am, L.V.Gandhi wrote:
> > I get following error.
> > Sep 30 05:29:02 lvghomepc anacron[1507]: Job `cron.daily' started
> > Sep 30 05:29:02 lvghomepc anacron[1770]: Updated timestamp for job
> > `cron.daily' to 2003-09-30
> > Sep 30 05:29:51 lvghomepc anacron[1507]: Job `cron.daily' terminated
> > (exit status: 1) (mailing output)
> >
> > I think exit status 1 indicates error. Where this mailed output goes.
>
> It goes to the email address (or users mail spool file) listed in the
> MAILTO= parameter in /etc/crontab
>
> If you want it to go to an email address then you must either be running a
> mail server to have the ssmtp RPM installed to forward the mail to a mail
> server. (Config file in /etc/ssmtp/ssmtp.conf )

I have installed postfix. it is shown also as below.

Oct  7 05:04:07 lvghomepc postfix: Starting postfix:
Oct  7 05:04:10 lvghomepc postfix:  succeeded
Oct  7 05:04:10 lvghomepc postfix: ^[[65G[^[[1;32m
Oct  7 05:04:10 lvghomepc postfix:
Oct  7 05:04:10 lvghomepc rc: Starting postfix:  succeeded

Now error from anacron has gone. I feel this si because it can send output to 
root as in 
[EMAIL PROTECTED] security]# cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root nice -n 19 run-parts /etc/cron.hourly
02 4 * * * root nice -n 19 run-parts /etc/cron.daily
22 4 * * 0 root nice -n 19 run-parts /etc/cron.weekly
42 4 1 * * root nice -n 19 run-parts /etc/cron.monthly

but the cron.daily exit status shows error.

Oct  7 05:09:24 lvghomepc anacron[1608]: Job `cron.daily' started
Oct  7 05:09:24 lvghomepc anacron[1851]: Updated timestamp for job 
`cron.daily' to 2003-10-07
Oct  7 05:10:15 lvghomepc anacron[1608]: Job `cron.daily' terminated (exit 
status: 1) (mailing output)
Oct  7 05:10:15 lvghomepc anacron[1608]: Normal exit (1 jobs run)

 But mail in root prompt shows no mail for root. How to find reason for exit 
status 1.
-- 
L.V.Gandhi
203, Soundaryalahari Apartments, Lawsons Bay colony, Visakhapatnam, 530017
MECON, 5th Floor, RTC Complex, Visakhapatnam AP 530020 INDIA
http://lvgandhi.tripod.com/


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] cron error

2003-10-01 Thread Derek Jennings
On Wednesday 01 Oct 2003 1:13 am, L.V.Gandhi wrote:
> I get following error.
> Sep 30 05:29:02 lvghomepc anacron[1507]: Job `cron.daily' started
> Sep 30 05:29:02 lvghomepc anacron[1770]: Updated timestamp for job
> `cron.daily' to 2003-09-30
> Sep 30 05:29:51 lvghomepc anacron[1507]: Job `cron.daily' terminated (exit
> status: 1) (mailing output)
>
> I think exit status 1 indicates error. Where this mailed output goes.

It goes to the email address (or users mail spool file) listed in the 
MAILTO= parameter in /etc/crontab

If you want it to go to an email address then you must either be running a 
mail server to have the ssmtp RPM installed to forward the mail to a mail 
server. (Config file in /etc/ssmtp/ssmtp.conf )

derek
-- 
--
www.jennings.homelinux.net
http://twiki.mdklinuxfaq.org


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] cron error

2003-10-01 Thread Raffaele Belardi
I don't know about the cron error, but regarding the mail output, "man 
cron" says:

"When executing commands, any output is mailed to the owner of the 
crontab (or to the user named in the MAILTO environment variable in the 
crontab, if such exists)."

Naturally, there must be a mailer deamon running (sendmail or other) for 
that to work. Sorry if I state the obvious.

raffaele

[EMAIL PROTECTED] wrote:
I get following error.
Sep 30 05:29:02 lvghomepc anacron[1507]: Job `cron.daily' started
Sep 30 05:29:02 lvghomepc anacron[1770]: Updated timestamp for job 
`cron.daily' to 2003-09-30
Sep 30 05:29:51 lvghomepc anacron[1507]: Job `cron.daily' terminated (exit 
status: 1) (mailing output)

Oct  1 05:26:29 lvghomepc anacron[1480]: Job `cron.daily' started
Oct  1 05:26:29 lvghomepc anacron[1892]: Updated timestamp for job 
`cron.daily' to 2003-10-01
Oct  1 05:26:30 lvghomepc ADVXctl: httpd -HUP succeeded
Oct  1 05:26:33 lvghomepc last message repeated 11 times
Oct  1 05:28:04 lvghomepc su(pam_unix)[6800]: session opened for user root by 
lvgandhi(uid=501)
Oct  1 05:28:15 lvghomepc anacron[1480]: Job `cron.daily' terminated (exit 
status: 1) (mailing output)

but var/log/cron shows no errors as given below and root also didn't show any 
mail .
[EMAIL PROTECTED] lvgandhi]# cd /var/log/cron/
[EMAIL PROTECTED] cron]# l
total 10
drwxr-xr-x2 root root  120 Sep 28 02:24 ./
drwxr-xr-x   12 root root 1152 Oct  1 05:26 ../
-rw-r-1 root root0 Sep 28 02:24 errors
-rw-r-1 root root 6351 Oct  1 05:28 info
-rw-r-1 root root0 Sep 28 02:24 warnings

[EMAIL PROTECTED] cron]# tail info
Sep 30 21:01:00 lvghomepc CROND[3262]: (root) CMD (nice -n 19 run-parts 
/etc/cron.hourly)
Sep 30 21:08:13 lvghomepc crond[1475]: (CRON) STARTUP (fork ok)
Sep 30 21:08:17 lvghomepc anacron[1533]: Anacron 2.3 started on 2003-09-30
Sep 30 21:08:18 lvghomepc anacron[1533]: Normal exit (0 jobs run)
Oct  1 05:21:24 lvghomepc crond[1425]: (CRON) STARTUP (fork ok)
Oct  1 05:21:29 lvghomepc anacron[1480]: Anacron 2.3 started on 2003-10-01
Oct  1 05:21:29 lvghomepc anacron[1480]: Will run job `cron.daily' in 5 min.
Oct  1 05:26:29 lvghomepc anacron[1480]: Job `cron.daily' started
Oct  1 05:26:29 lvghomepc anacron[1892]: Updated timestamp for job 
`cron.daily' to 2003-10-01
Oct  1 05:28:15 lvghomepc anacron[1480]: Job `cron.daily' terminated (exit 
status: 1) (mailing output)

I think exit status 1 indicates error. Where this mailed output goes.



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


[newbie] cron error

2003-09-30 Thread L.V.Gandhi
I get following error.
Sep 30 05:29:02 lvghomepc anacron[1507]: Job `cron.daily' started
Sep 30 05:29:02 lvghomepc anacron[1770]: Updated timestamp for job 
`cron.daily' to 2003-09-30
Sep 30 05:29:51 lvghomepc anacron[1507]: Job `cron.daily' terminated (exit 
status: 1) (mailing output)

Oct  1 05:26:29 lvghomepc anacron[1480]: Job `cron.daily' started
Oct  1 05:26:29 lvghomepc anacron[1892]: Updated timestamp for job 
`cron.daily' to 2003-10-01
Oct  1 05:26:30 lvghomepc ADVXctl: httpd -HUP succeeded
Oct  1 05:26:33 lvghomepc last message repeated 11 times
Oct  1 05:28:04 lvghomepc su(pam_unix)[6800]: session opened for user root by 
lvgandhi(uid=501)
Oct  1 05:28:15 lvghomepc anacron[1480]: Job `cron.daily' terminated (exit 
status: 1) (mailing output)

but var/log/cron shows no errors as given below and root also didn't show any 
mail .
[EMAIL PROTECTED] lvgandhi]# cd /var/log/cron/
[EMAIL PROTECTED] cron]# l
total 10
drwxr-xr-x2 root root  120 Sep 28 02:24 ./
drwxr-xr-x   12 root root 1152 Oct  1 05:26 ../
-rw-r-1 root root0 Sep 28 02:24 errors
-rw-r-1 root root 6351 Oct  1 05:28 info
-rw-r-1 root root0 Sep 28 02:24 warnings

[EMAIL PROTECTED] cron]# tail info
Sep 30 21:01:00 lvghomepc CROND[3262]: (root) CMD (nice -n 19 run-parts 
/etc/cron.hourly)
Sep 30 21:08:13 lvghomepc crond[1475]: (CRON) STARTUP (fork ok)
Sep 30 21:08:17 lvghomepc anacron[1533]: Anacron 2.3 started on 2003-09-30
Sep 30 21:08:18 lvghomepc anacron[1533]: Normal exit (0 jobs run)
Oct  1 05:21:24 lvghomepc crond[1425]: (CRON) STARTUP (fork ok)
Oct  1 05:21:29 lvghomepc anacron[1480]: Anacron 2.3 started on 2003-10-01
Oct  1 05:21:29 lvghomepc anacron[1480]: Will run job `cron.daily' in 5 min.
Oct  1 05:26:29 lvghomepc anacron[1480]: Job `cron.daily' started
Oct  1 05:26:29 lvghomepc anacron[1892]: Updated timestamp for job 
`cron.daily' to 2003-10-01
Oct  1 05:28:15 lvghomepc anacron[1480]: Job `cron.daily' terminated (exit 
status: 1) (mailing output)

I think exit status 1 indicates error. Where this mailed output goes.
-- 
L.V.Gandhi
203, Soundaryalahari Apartments, Lawsons Bay colony, Visakhapatnam, 530017
MECON, 5th Floor, RTC Complex, Visakhapatnam AP 530020 INDIA
http://lvgandhi.tripod.com/


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] cron & smbtar

2002-12-25 Thread Stephen Kuhn
On Wed, 2002-12-25 at 21:57, Colin Jenkins wrote:
> Hi all,
> The script below works ok from the command line but when I run it as a
> cron job, it starts ok, but stops after backing up a few directories.
> Any ideas what I'm doing wrong? is it a bug with cron?
> btw, I'm using mdk9
> 
> #!/bin/sh
> smbtar -s elendil -t /dev/st0 -x "stuff1" -v -i  -X System\ Volume\ Information
> mt -f /dev/st0 offline  
> 
> -- 
> regards,
>  Colin
> 

You might want to give ownership of the cron job to root - so that it
will run no matter what - could be that when the job hits those
directories it's "chucking a wobbly" because of improper permissions.

-- 
Thu Dec 26 05:55:00 EST 2002
  5:55am  up 20:40,  5 users,  load average: 0.04, 0.25, 0.55
--
|____  | kühn media australia|
|   / ,, /| |'-.   | http://kma.0catch.com   |
|  .\__/ || |   |  |=|
|   _ /  `._ \|_|_.-'  | stephen kühn|
|  | /  \__.`=._) (_   |  email: [EMAIL PROTECTED] |
|  |/ ._/  |"| |  email: [EMAIL PROTECTED]|
|  |'.  `\ | | |icq: 5483808 |
|  ;"""/ / | | | |
|  smk  ) /_/| |.---.| | mobile: 0410-728-389|
|  '  `-`' " " | Berkeley, New South Wales, AU   |
--
* linux user:267497 * RH 7.3+ * PC/Mac/Linux/Networking/Consulting
Coralament*Best Grötens*Liebe Grüße*Best Regards*Elkorajn Salutojn

When you jump for joy, beware that no-one moves the ground from beneath
your feet.
-- Stanislaw Lem, "Unkempt Thoughts"


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] cron problem

2002-12-10 Thread Derek Jennings
On Saturday 07 Dec 2002 2:10 am, L.V.Gandhi wrote:
> I have the following /etc/crontab
> [root@localhost lvgandhi]# cat /etc/crontab
> SHELL=/bin/bash
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> MAILTO=root
> HOME=/
>
> # run-parts
> 01 * * * * root nice -n 19 run-parts /etc/cron.hourly
> 02 4 * * * root nice -n 19 run-parts /etc/cron.daily
> 22 4 * * 0 root nice -n 19 run-parts /etc/cron.weekly
> 42 4 1 * * root nice -n 19 run-parts /etc/cron.monthly
> But for hourly cron, rest are not working now. In my previous installation
> mandrake 9, with same crontab, all used to work irrespective whether PC was
> on at 4:40 am or not. What can be the problem.

Perhaps like me you do not have  the anacron RPM installed? It seems as if 
anacron is no longer installed by default.

Anacron will run any job that cron is late running (because the computer was 
switched off at the time)

HTH

derek



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[newbie] cron problem

2002-12-09 Thread L.V.Gandhi
I have the following /etc/crontab
[root@localhost lvgandhi]# cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root nice -n 19 run-parts /etc/cron.hourly
02 4 * * * root nice -n 19 run-parts /etc/cron.daily
22 4 * * 0 root nice -n 19 run-parts /etc/cron.weekly
42 4 1 * * root nice -n 19 run-parts /etc/cron.monthly
But for hourly cron, rest are not working now. In my previous installation 
mandrake 9, with same crontab, all used to work irrespective whether PC was 
on at 4:40 am or not. What can be the problem.
-- 
L.V.Gandhi
203, Soundaryalahari Apartments, Lawsons Bay colony, Visakhapatnam, 530017
MECON, 5th Floor, RTC Complex, Visakhapatnam AP 530020 INDIA




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] cron

2002-11-15 Thread Stephen Kuhn
On Fri, 2002-11-15 at 17:19, Colin Jenkins wrote:
> Hi all,
> I have asked this question a few times before with no reply, so I
> thought I'd try once more before I give up.
> I have a very simple script to back up the user directory on an nt server.
> The directory is mounted on my lm9.0 box (samba) and is backed up to a
> dat tape.
> If I run the script from the shell or from the icon I created, the
> back up works fine (about 600 users)
> When I run it as a cron job, the backup starts, but quits with no
> errors AFTER backing up the first 2 users.
> If any further ifo would help, please let me know.
> I'm having to manually start the backup every night, which is a pain
> in the rectum. :((
> -- 
> regards,
>  Colin

Being that you're an Australian, I'll try to give ya a hand mate! (grin)

When you set up the cron job, who owns the job? Or, when it's run, who
is the user that it is running as? (Preferably root would be a good
owner for that job) - that's the first part to start looking into...
(BTW, what software are you using for your backup solution?)

Cheers from Wollongong!

-- 
Fri Nov 15 21:10:01 EST 2002


|____  |
|   /  \ /| |'-.   |
|  .\__/ || |   |  |
|   _ /  `._ \|_|_.-'  |
|  | /  \__.`=._) (_   |kuhn media australia
|  |/ ._/  |"| |http://kma.0catch.com
|  |'.  `\ | | |stephen kuhn
|  ;"""/ / | | |email: [EMAIL PROTECTED]
|  smk  ) /_/| |.---.| |mobile: 0410-728-389
|  '  `-`' " " |linux user:267497


Just go with the flow control, roll with the crunches, and, when you get
a prompt, type like hell.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[newbie] cron

2002-11-14 Thread Colin Jenkins
Hi all,
I have asked this question a few times before with no reply, so I
thought I'd try once more before I give up.
I have a very simple script to back up the user directory on an nt server.
The directory is mounted on my lm9.0 box (samba) and is backed up to a
dat tape.
If I run the script from the shell or from the icon I created, the
back up works fine (about 600 users)
When I run it as a cron job, the backup starts, but quits with no
errors AFTER backing up the first 2 users.
If any further ifo would help, please let me know.
I'm having to manually start the backup every night, which is a pain
in the rectum. :((

  

-- 
regards,
 Colin

mailto:colinjenkins@;optushome.com.au

 
5:00pm up 1 day, 21:18, 2 users, load average: 0.65, 0.57, 0.60
It has long been an article of our folklore that too much knowledge or skill, or 
especially consummate expertise, is a bad thing. It dehumanizes those who achieve it, 
and makes difficult their commerce with just plain folks, in whom good old common 
sense has not been obliterated by mere book learning or fancy notions. This popular 
delusion flourishes now more than ever, for we are all infected with it in the 
schools, where educationists have elevated it from folklore to Article of Belief. It 
enhances their self-esteem and lightens their labors by providing theoretical 
justification for deciding that appreciation, or even simple awareness, is more to be 
prized than knowledge, and relating (to self and others), more than skill, in which 
minimum competence will be quite enough. -- The Underground Grammarian
 ..registered linux user #223862 ..
   _ 




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] cron is broken?

2002-11-11 Thread Stephen Kuhn
On Mon, 2002-11-11 at 16:51, Ibly Piblo wrote:
> I can't set up a cron job, either cron or
> webmin is broken.
> 
> I try to make it play an mp3 file, with the
> command mpg123 -b 3000 /home/ipiblo/music.mp3
> and all it can do is tell me the "home environment
> variable is not set?"
> 
> How useless.
> 
> It always worked back in 8.2, I don't
> understand why its broken, more important,
> how do i fix this?
> 
> Your help is greatly appreciated, my computer
> is my alarm clock and I have to be up for work
> tomorrow.
> 
> Thanks to all who help.
> 
> Ibly
> 
Is it safe to assume that you've tried to use KDE's cron utility as well
? And that you've check that the "service" daemon is up and running?

-- 
Mon Nov 11 22:35:00 EST 2002


|____  |
|   /  \ /| |'-.   |
|  .\__/ || |   |  |
|   _ /  `._ \|_|_.-'  |
|  | /  \__.`=._) (_   |kuhn media australia
|  |/ ._/  |"| |http://kma.0catch.com
|  |'.  `\ | | |stephen kuhn
|  ;"""/ / | | |email: [EMAIL PROTECTED]
|  smk  ) /_/| |.---.| |mobile: 0410-728-389
|  '  `-`' " " |


Fortune's Real-Life Courtroom Quote #7:

Q:  What happened then?
A:  He told me, he says, "I have to kill you because you can identify
me."
Q:  Did he kill you?
A:  No.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[newbie] cron is broken?

2002-11-10 Thread Ibly Piblo
I can't set up a cron job, either cron or
webmin is broken.

I try to make it play an mp3 file, with the
command mpg123 -b 3000 /home/ipiblo/music.mp3
and all it can do is tell me the "home environment
variable is not set?"

How useless.

It always worked back in 8.2, I don't
understand why its broken, more important,
how do i fix this?

Your help is greatly appreciated, my computer
is my alarm clock and I have to be up for work
tomorrow.

Thanks to all who help.

Ibly

__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] cron or anacron

2002-08-20 Thread Ross Pearson


Yes, this is what anacron does with all the jobs in /etc/crontab but I
can't seem to make it look for missed jobs in individual user's
crontabs. 

Is it possible to do this?

Ross

> AFAIK Anacron will pick and run any jobs that have not been executed by cron
> in time. So when you set up the FTP in the user crontab and the machine is
> down, anacron will perform the task after booting the machine.
> 
> That is what anacron is made for.



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] cron or anacron

2002-08-19 Thread Paul

In reply to Ross's mail, d.d. Mon, 19 Aug 2002 22:27:21 +0100:

AFAIK Anacron will pick and run any jobs that have not been executed by cron
in time. So when you set up the FTP in the user crontab and the machine is
down, anacron will perform the task after booting the machine.

That is what anacron is made for.

Paul

>Does anyone know if its possible to have anacron run tasks for
>individual users, in a similar way to how each user can be allowed
>their own crontab?
>
>I have a script that involves an ftp operation and must access .netrc
>in the users home directory, so it seems that it can only be run by
>that specific user. I need to be sure that the script runs at least
>once a week but my system does not run all the time.

--
What you will do matters. All you need is to do it.
-Judy Grahn

http://nlpagan.net-Linux Mandrake 8.2 -   Sylpheed 0.8.0
Help Microsoft combat software piracy: give Linux to a friend today!



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[newbie] cron or anacron

2002-08-19 Thread Ross Pearson

Does anyone know if its possible to have anacron run tasks for
individual users, in a similar way to how each user can be allowed
their own crontab?

I have a script that involves an ftp operation and must access .netrc
in the users home directory, so it seems that it can only be run by
that specific user. I need to be sure that the script runs at least
once a week but my system does not run all the time.

Any advice will be much appreciated.

thanks
Ross



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[newbie] cron/anacron job

2002-07-28 Thread Mark Curry

Hi,

I have written a script which I want cron to run and anacron.

Although I know the script works okay from a bash prompt Anacron tells
me:

run-parts: component /var/spool/cron/mark is not an executable plain
file'

I created the job using crontab -e, which installs crontab after editing
and sets the file permissions as -rw--- automatically.

Should I make the file executable ? - and if so why does crontab -e
change the permissions ?

Help appreciated.

Mark



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] cron job

2002-05-27 Thread Michael Adams

On Sat, 18 May 2002 16:57, Miark wrote:
> I have the following entry in my crontab to run every morning:
>
>   05 03 * * * tar -czf /backup/`date +%a`_www_backup.tar.gz /www
>
> But it's apparently _not_ doing it. However
>
> * Crond is running.
> * Other entries in the crontab are being performed.
> * Running the command manually works fine:
>tar -czf /backup/`date +%a`_www_backup.tar.gz /www
>
> What's the problem here?
>
> tia,
> Miark

Miark, this one has been sitting around for a while with no replies (that 
i've seen). I can't fathom it either. Lack of experience with cron. But you 
say it works manually so:

- Set it up as a script.

- Test it by running the script.

- If that works try getting cron to run the script instead of executing the 
command direct.

Just a thought.

-- 
Michael



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] cron job

2002-05-19 Thread daRcmaTTeR

> I have the following entry in my crontab to run every morning:
>
>   05 03 * * * tar -czf /backup/`date +%a`_www_backup.tar.gz /www
>
> But it's apparently _not_ doing it. However
>
> * Crond is running.
> * Other entries in the crontab are being performed.
> * Running the command manually works fine:
>tar -czf /backup/`date +%a`_www_backup.tar.gz /www
>
> What's the problem here?
>
> tia,
> Miark

Miark,

I think I see the problem here. its the syntaz you're using to get the
date at the beginning of your arc file.

you're saying to the system: tar -czf /backup/`date
+%a`_www_backup.tar.gz /www
  ^^

when you should be saying it like this:
tar -czf /backup/$(date
+%a)_www_backup.tar.gz /www

try that...that should do the trick for you.

daRcmaTTeR




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[newbie] cron job

2002-05-17 Thread Miark

I have the following entry in my crontab to run every morning:

  05 03 * * * tar -czf /backup/`date +%a`_www_backup.tar.gz /www

But it's apparently _not_ doing it. However

* Crond is running.
* Other entries in the crontab are being performed.
* Running the command manually works fine:
   tar -czf /backup/`date +%a`_www_backup.tar.gz /www

What's the problem here?

tia,
Miark




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



RE: [newbie] Cron

2002-01-30 Thread Franki

I have seen some strange results from proxy servers with webmin, my isp's
proxy has to be removed from my browser before I can use webmin at all.. (or
the url of the webmin box added to the proxy exclusion list.. perhaps its
something you should look at...


rgds

Frank

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Anke & Max
Sent: Saturday, 26 January 2002 9:19 PM
To: [EMAIL PROTECTED]
Subject: Re: [newbie] Cron



> > Gidday Derek and everyone else
> >
> > I've been using webmin from a Mac and I can't for the life of me, get it
to
> > accept the certificate
> > It asks again and again if I want to continue and I can't find anywhere
to
> > turn it off. You wouldn't know of a cure would you?
> > TIA
> > max
>
> well I'm assuming you are accepting the certificate?
> Have you tried a different browser? Otherwise I have no idea
>
> derek

Yes, good assumption. Tried IE 4.5 for Mac and Netscape ?.?
They both refuse to accept the cert and ask on every page.
Kinda frustrating, but at least Webmin does now work.
Thanks for the try,
max






Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Cron

2002-01-26 Thread Anke & Max


> > Gidday Derek and everyone else
> >
> > I've been using webmin from a Mac and I can't for the life of me, get it to
> > accept the certificate
> > It asks again and again if I want to continue and I can't find anywhere to
> > turn it off. You wouldn't know of a cure would you?
> > TIA
> > max
> 
> well I'm assuming you are accepting the certificate?
> Have you tried a different browser? Otherwise I have no idea
> 
> derek

Yes, good assumption. Tried IE 4.5 for Mac and Netscape ?.? 
They both refuse to accept the cert and ask on every page.
Kinda frustrating, but at least Webmin does now work.
Thanks for the try,
max 




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Cron

2002-01-25 Thread Derek Jennings

On Friday 25 January 2002 13:02, Anke & Max wrote:
> Derek said on Thursday, January 24
>
> > A nice way to administer cron jobs is with webmin
> >
> > Just install the webmin package and put https://localhost.1 in a
> > browser URL line.

By the way: This was a type. It should read
https://localhost:1


> >
> > You will get a warning message about a self certified certificate the
> > first time you run it. Just accept it.
> >
> > Note https  not http, and if it does not work check the webmin service is
> > running.
> >
> > Webmin allows you to configure almost every aspect of your computer in a
> > simple manner, and even works remotely.
> >
> > HTH
> >
> > derek
>
> Gidday Derek and everyone else
>
> I've been using webmin from a Mac and I can't for the life of me, get it to
> accept the certificate
> It asks again and again if I want to continue and I can't find anywhere to
> turn it off. You wouldn't know of a cure would you?
> TIA
> max

well I'm assuming you are accepting the certificate?
Have you tried a different browser? Otherwise I have no idea

derek




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Cron

2002-01-25 Thread Anke & Max

Derek said on Thursday, January 24

> A nice way to administer cron jobs is with webmin
>
> Just install the webmin package and put https://localhost.1 in a browser
> URL line.
>
> You will get a warning message about a self certified certificate the first
> time you run it. Just accept it.
>
> Note https  not http, and if it does not work check the webmin service is
> running.
>
> Webmin allows you to configure almost every aspect of your computer in a
> simple manner, and even works remotely.
>
> HTH
>
> derek

Gidday Derek and everyone else

I've been using webmin from a Mac and I can't for the life of me, get it to accept the
certificate
It asks again and again if I want to continue and I can't find anywhere to turn it off.
You wouldn't know of a cure would you?
TIA
max




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Cron

2002-01-24 Thread Mario Michael da Costa

Miark wrote:
> 
> Thanks, Mario. I had the varibale set in .bashrc, but I was
> missing the "export". Now it works like a charm!
> 
> Miark
> 
Hello Miark,
You're welcome.

for those who use a c-shell instead of a bash, the commnad would be
"setenv" instead of "export", without the "=" sign.

Thank You,
Regards,
mario



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Cron

2002-01-24 Thread Miark

Thanks, Mario. I had the varibale set in .bashrc, but I was 
missing the "export". Now it works like a charm!

Miark

- Original Message - 
From: "Mario Michael da Costa" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 24, 2002 12:12 AM
Subject: Re: [newbie] Cron


> Miark wrote:
> > 
> > > Wouldn't
> > >
> > > crontab -e
> > >
> > > be much easier? This edits your personal crontab and after saving it, cron
> > > will pick up the revised version and run that. This way cron will also pick
> > > it up after a reboot. Btw, crontab -l will list the current cron jobs you
> > > have set up.
> > 
> > It probably would if the editor were set up right ;-) I use MicroEmacs,
> > but crontab -e always invokes the Devil, er, vi. I just never got
> > around to figuring out how to make it us uemacs.
> 
> put this line in your .bashrc
> export EDITOR=emacs
> 
> lo and behold, crontab -e should then invoke the kitchen sink instead
> of the devil :o)
> 
> Thank You,
> Regards,
> mario
> 
> 





> Want to buy your Pack or Services from MandrakeSoft? 
> Go to http://www.mandrakestore.com
> 




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Cron

2002-01-23 Thread Mario Michael da Costa

Miark wrote:
> 
> > Wouldn't
> >
> > crontab -e
> >
> > be much easier? This edits your personal crontab and after saving it, cron
> > will pick up the revised version and run that. This way cron will also pick
> > it up after a reboot. Btw, crontab -l will list the current cron jobs you
> > have set up.
> 
> It probably would if the editor were set up right ;-) I use MicroEmacs,
> but crontab -e always invokes the Devil, er, vi. I just never got
> around to figuring out how to make it us uemacs.

put this line in your .bashrc
export EDITOR=emacs

lo and behold, crontab -e should then invoke the kitchen sink instead
of the devil :o)

Thank You,
Regards,
mario



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Cron

2002-01-23 Thread Miark

> Wouldn't
> 
> crontab -e
> 
> be much easier? This edits your personal crontab and after saving it, cron
> will pick up the revised version and run that. This way cron will also pick
> it up after a reboot. Btw, crontab -l will list the current cron jobs you
> have set up.

It probably would if the editor were set up right ;-) I use MicroEmacs, 
but crontab -e always invokes the Devil, er, vi. I just never got 
around to figuring out how to make it us uemacs.

Miark




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Cron

2002-01-23 Thread Paul

On Wed, 23 Jan 2002 22:43:30 -0700 Miark wrote:

Wouldn't

crontab -e

be much easier? This edits your personal crontab and after saving it, cron
will pick up the revised version and run that. This way cron will also pick
it up after a reboot. Btw, crontab -l will list the current cron jobs you
have set up.

Paul

>>I have a script that I need to add for cron to run once a week.
>>How do i tell cron to run them? i have no idea where the cron 
>>configs are
>
>Jesse,
>
>1)  In your home directory, or somewhere abouts, 
>make a file called "mycronjobs" or something similar
>that will easily remind you of what it is. It's in
>this file that you'll put all your cron jobs.
>
>2)  In the file, put one line as follows:
>
>00 00 * * 01 /path/to/script
>
>3) Back in the shell, type the following:
>
>crontab mycronjobs 
>
>And you're done. In the future, if you want to add
>jobs, add them to this file, the update the cron
>table with "crontab mycronjobs".
>
>---
>
>The first five numbers/asterisks in the job description are as 
>follows:
>
>00-59   Minute
>00-23   Hour
>01-31   Day's date
>01-12   Month
>01-07   Day (Monday, etc.)
>
>If you want a specific time or day, then use the numbers;
>use an asterisk for any specifics that don't matter.
>In the example I gave (00 00 * * 01) it will execute the
>script at midnight (00 minutes, and 00 hours), on any date (*),
>of any month (*), every Sunday (01). Or is 01 Monday? I forget.
>
>Miark


--
One machine can do the work of fifty ordinary men.
No machine can do the work of one extraordinary man.
-Elbert Hubbard

http://nlpagan.net - Registered Linux User 174403
Linux Mandrake 8.0 - Sylpheed 0.7.0



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Cron

2002-01-23 Thread Miark

>I have a script that I need to add for cron to run once a week.
>How do i tell cron to run them? i have no idea where the cron 
>configs are
>
>mandrake 8.1
>
>Jesse angell

Jesse,

1)  In your home directory, or somewhere abouts, 
make a file called "mycronjobs" or something similar
that will easily remind you of what it is. It's in
this file that you'll put all your cron jobs.

2)  In the file, put one line as follows:

00 00 * * 01 /path/to/script

3) Back in the shell, type the following:

crontab mycronjobs 

And you're done. In the future, if you want to add
jobs, add them to this file, the update the cron
table with "crontab mycronjobs".

---

The first five numbers/asterisks in the job description are as 
follows:

00-59   Minute
00-23   Hour
01-31   Day's date
01-12   Month
01-07   Day (Monday, etc.)

If you want a specific time or day, then use the numbers;
use an asterisk for any specifics that don't matter.
In the example I gave (00 00 * * 01) it will execute the
script at midnight (00 minutes, and 00 hours), on any date (*),
of any month (*), every Sunday (01). Or is 01 Monday? I forget.

Miark






Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[newbie] Cron

2002-01-23 Thread Jesse Angell



        I have a 
script that I need to add for cron to run once a week.. how do i tell cron to 
run them? i have no idea where the cron configs are
 
mandrake 8.1
 
Jesse angell


Re: [newbie] cron

2002-01-10 Thread Ed Kasky

One can also change their EDITOR env setting to pico should one be so 
inclined...

Ed

At 11:38 AM 1/10/2002, Real Name wrote:
>or just enter
>crontab -e
>from any prompt and make your edits in VI
>   Dan B
>
>On Thu, 10 Jan 2002 10:20:27 -0500
>  sda <[EMAIL PROTECTED]> wrote:
> > On Wed, Jan 09, 2002 at 09:17:02PM -0500, Gerald Waugh wrote:
> > > On Wednesday 09 January 2002 06:24 am, Mark D'voo wrote:
> > > > I have a bash script that I want run every hour as my regular
> > user, how do
> > > > I setup cron to do this?
> > > >
> > > > mark
> > >
> > > easiest
> > > put the script in the /etc/cron.hourly directory.
> >
> > Use Webmin and point it at the script you want to run from the
> > crontab
> > setup menu [in Webmin].
> >
> > --
> > Stevecurrent Linux kernel 2.4.8
> > ===
> >  10:10am  up 19 days, 16:47, 13 users,  load average: 0.25, 0.16,
> > 0.15
> > ===
> > Kath: Can he be present at the birth of his child?
> > Ed: It's all any reasonable child can expect if the dad is present
> >   at the conception.
> >   -- Joe Orton, "Entertaining Mr. Sloane"
> >
>
>
>Want to buy your Pack or Services from MandrakeSoft?
>Go to http://www.mandrakestore.com




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



RE: [newbie] cron

2002-01-10 Thread Franki

or even better, to mcedit...

mcedit (and mc itself) is in my opinion one of the least known about but
incrediably handy tools around for console work..

I actually prefer using mc in an xterm, or mostly just a console, to using
konqueror or other gui tools..

for ftp, text browsing, file browsing and editing, symlink editing,
permission editing, tons of stuff..

If you ever get the desire to explore your filesystem and want to quickly
open, look and and close lots of files and stuff, ,you simply can't go past
mc.. I have been using it for so long now, that I sometimes find it annoying
to be working on a box that doesn't have it installed..

also, mc will work just fine in remote admin, as it will display and work in
any telnet or ssh client on any platform..
I use it all the time in Terra term Pro on win2000 to work on remote linux
boxes...

its much faster then moving around the file system manually and starting
your editor when you get to a file you want.

and it has a console prompt at the bottom at all times, so you can still use
cd /xxx if its faster then using the arrow keys..

I know I should sneer at this little app after using linux for 8 years, but
I still find it terribly handy.


rgds

Frank

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ed Kasky
Sent: Friday, 11 January 2002 3:37 AM
To: [EMAIL PROTECTED]
Subject: Re: [newbie] cron


One can also change their EDITOR env setting to pico should one be so
inclined...

Ed

At 11:38 AM 1/10/2002, Real Name wrote:
>or just enter
>crontab -e
>from any prompt and make your edits in VI
>   Dan B
>
>On Thu, 10 Jan 2002 10:20:27 -0500
>  sda <[EMAIL PROTECTED]> wrote:
> > On Wed, Jan 09, 2002 at 09:17:02PM -0500, Gerald Waugh wrote:
> > > On Wednesday 09 January 2002 06:24 am, Mark D'voo wrote:
> > > > I have a bash script that I want run every hour as my regular
> > user, how do
> > > > I setup cron to do this?
> > > >
> > > > mark
> > >
> > > easiest
> > > put the script in the /etc/cron.hourly directory.
> >
> > Use Webmin and point it at the script you want to run from the
> > crontab
> > setup menu [in Webmin].
> >
> > --
> > Stevecurrent Linux kernel 2.4.8
> >
===
> >  10:10am  up 19 days, 16:47, 13 users,  load average: 0.25, 0.16,
> > 0.15
> >
===
> > Kath: Can he be present at the birth of his child?
> > Ed: It's all any reasonable child can expect if the dad is present
> >   at the conception.
> >   -- Joe Orton, "Entertaining Mr. Sloane"
> >
>
>
>Want to buy your Pack or Services from MandrakeSoft?
>Go to http://www.mandrakestore.com






Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] cron

2002-01-10 Thread Miark

Once an hour? Okay, here we go.

1)  In your home directory, or somewhere abouts, 
make a file called "mycronjobs" or something similar
that will easily remind you of what it is. It's in
this file that you'll put all your cron jobs.

2)  In the file, pun one line as follows:

00 * * * * /path/to/script

3) Back in the shell, type the following:

crontab mycronjobs 

And you're done. In the future, if you want to add
jobs, add them to this file, the update the cron
table with "crontab mycronjobs".

---

It's extremely easy to use. They go like this

00-59   Minute
00-23   Hour
01-31   Day's date
01-12   Month
01-07   Day (Monday, etc.)

If you want a specific time or day, then use the numbers,
and use an asterisk for any specifics that don't matter.
In the example I gave, 00 * * * *, it will execute the
script on the hour (00), every hour (*), of any date (*),
of every month (*), regardless of the day of the week (*).

Miark





Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] cron

2002-01-10 Thread Real Name

or just enter
crontab -e
from any prompt and make your edits in VI
  Dan B

On Thu, 10 Jan 2002 10:20:27 -0500
 sda <[EMAIL PROTECTED]> wrote:
> On Wed, Jan 09, 2002 at 09:17:02PM -0500, Gerald Waugh wrote:
> > On Wednesday 09 January 2002 06:24 am, Mark D'voo wrote:
> > > I have a bash script that I want run every hour as my regular
> user, how do
> > > I setup cron to do this?
> > >
> > > mark
> > 
> > easiest
> > put the script in the /etc/cron.hourly directory.
> 
> Use Webmin and point it at the script you want to run from the
> crontab
> setup menu [in Webmin].
> 
> -- 
> Stevecurrent Linux kernel 2.4.8
> ===
>  10:10am  up 19 days, 16:47, 13 users,  load average: 0.25, 0.16,
> 0.15
> ===
> Kath: Can he be present at the birth of his child?
> Ed: It's all any reasonable child can expect if the dad is present
>   at the conception.
>   -- Joe Orton, "Entertaining Mr. Sloane"
> 




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] cron

2002-01-09 Thread Navin

i can give u a newbie tip only if the 'expert' guys do not laugh at me :-)

I actually tried to use the cron and crontab files but could not understand 
the format of the crontab file. tried looking into docs but nothing.

So I use kcron now - it lets you define a crontab file - asks cron to use that 
file and run your commands as you and not as root - is you use /etc/crontab 
the task will run as root (that was another problem I faced when I figured 
out the format). kcron will place your personal crontab files in 
/var/spool/cron directory and will have your name but you will be able to see 
them only if you are root.

also i have managed to run 'gui based' programs by setting the DISPLAY 
environment variable.

hope it helps

navin



On Thu, 10 Jan 2002 02:19, Mark D'voo wrote:
> On Thursday 10 January 2002 08:17 am, you wrote:
> > On Wednesday 09 January 2002 06:24 am, Mark D'voo wrote:
> > > I have a bash script that I want run every hour as my regular user, how
> > > do I setup cron to do this?
> > >
> > > mark
> >
> > easiest
> > put the script in the /etc/cron.hourly directory.
>
> hmm, i put it in that directory and it never ran, YES i do have the cron
> daemon running, is there anything special that needs to be in the script ??
> I finally just set it up using gts which seems to work fine
>
> mark
>
> > Gerald




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] cron

2002-01-09 Thread Mark D'voo

On Thursday 10 January 2002 08:17 am, you wrote:
> On Wednesday 09 January 2002 06:24 am, Mark D'voo wrote:
> > I have a bash script that I want run every hour as my regular user, how
> > do I setup cron to do this?
> >
> > mark
>
> easiest
> put the script in the /etc/cron.hourly directory.

hmm, i put it in that directory and it never ran, YES i do have the cron 
daemon running, is there anything special that needs to be in the script ??
I finally just set it up using gts which seems to work fine

mark

>
> Gerald

-- 
  9:18pm  up  4:01,  1 user,  load average: 0.04, 0.05, 0.03



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] cron

2002-01-09 Thread Gerald Waugh

On Wednesday 09 January 2002 06:24 am, Mark D'voo wrote:
> I have a bash script that I want run every hour as my regular user, how do
> I setup cron to do this?
>
> mark

easiest
put the script in the /etc/cron.hourly directory.

Gerald




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[newbie] cron

2002-01-09 Thread Mark D'voo

I have a bash script that I want run every hour as my regular user, how do I 
setup cron to do this?

mark

-- 
  5:24pm  up 6 min,  1 user,  load average: 0.40, 0.37, 0.19



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] cron message

2002-01-02 Thread Hal Wigoda


I think that the job
is trying to display
and recevive info
from the screen
and it can't as you are running the job
as a script.


> 
> This is a multi-part message in MIME format...
> 
> =_1009904480-11608-2751
> Content-Type: text/plain;
>   charset="US-ASCII"
> Content-Transfer-Encoding: 7bit
> 
> I have set up a cron job and this is the message i have received
> 
> Your terminal lacks the ability to clear the screen or position the cursor.
> 
> how vcan i solve this prob?
> thanks in advance
> 
> 
> =_1009904480-11608-2751
> Content-Type: text/plain; name="message.footer"
> Content-Disposition: inline; filename="message.footer"
> Content-Transfer-Encoding: 8bit
> 
> Want to buy your Pack or Services from MandrakeSoft? 
> Go to http://www.mandrakestore.com
> 
> =_1009904480-11608-2751--
> 




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[newbie] cron message

2002-01-01 Thread caspar kennerdale

I have set up a cron job and this is the message i have received

Your terminal lacks the ability to clear the screen or position the cursor.

how vcan i solve this prob?
thanks in advance



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Cron ???

2001-12-24 Thread Sridhar Dhanapalan

On Mon, 24 Dec 2001 14:12:32 +0800, "SKLIM" <[EMAIL PROTECTED]> wrote:
> [root@smtp /root]# cat /var/spool/cron/root
> # DO NOT EDIT THIS FILE - edit the master and reinstall.
> # (/tmp/crontab.8868 installed on Mon Dec 24 10:11:33 2001)
> # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
> 
> SHELL=/bin/bash
> PATH=/usr/bin
> MAILTO="[EMAIL PROTECTED]"
> 
> 0 9 * * 1-6 $PATH/killall fetchmail
> 0 9 * * 1-6 $PATH/fetchmail -d 300
> 
> 0 17 * * 1-6 $PATH/killall fetchmail
> 0 17 * * 1-6 $PATH/fetchmail -d 3600
> 
> 
> Hi! above is my cron setting ..I create .. But it does not work ...?
> Can someone help me ...what is my mistake ... ?
> 
> 
> Best Regards,
> SKLIM
> +6012 391 3638

You may want to try a graphical app like kcron. It can be much easier that way.

-- 
Sridhar Dhanapalan

Windows - 32 bit extensions and a graphical shell
for a 16 bit patch to an 8 bit operating system
originally coded for a 4 bit microprocessor,
written by a 2 bit company
that can't stand 1 bit of competition!



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Cron ???

2001-12-24 Thread quaylar

At 14:12 24.12.2001 +0800, you wrote:
>[root@smtp /root]# cat /var/spool/cron/root
># DO NOT EDIT THIS FILE - edit the master and reinstall.


did u see this line ? *g*


># (/tmp/crontab.8868 installed on Mon Dec 24 10:11:33 2001)
># (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
>
>SHELL=/bin/bash
>PATH=/usr/bin
>MAILTO="[EMAIL PROTECTED]"
>
>0 9 * * 1-6 $PATH/killall fetchmail
>0 9 * * 1-6 $PATH/fetchmail -d 300
>
>0 17 * * 1-6 $PATH/killall fetchmail
>0 17 * * 1-6 $PATH/fetchmail -d 3600
>
>Hi! above is my cron setting ..I create .. But it does not work ...?
>Can someone help me ...what is my mistake ... ?


u have to edit /etc/crontab in order to get this working - edit the file 
with an editor of your choice
and insert the cron jobs above (dont forget to set the user the cron jobs 
should be running as).
then save and "killall -HUP crond" - this will restart the cron service and 
your jobs should run properly.

greetings

--quay


>
>
>Best Regards,
>SKLIM
>+6012 391 3638




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[newbie] Cron ???

2001-12-23 Thread SKLIM



[root@smtp /root]# cat /var/spool/cron/root# DO 
NOT EDIT THIS FILE - edit the master and reinstall.# (/tmp/crontab.8868 
installed on Mon Dec 24 10:11:33 2001)# (Cron version -- $Id: crontab.c,v 
2.13 1994/01/17 03:20:37 vixie Exp $)
 
SHELL=/bin/bashPATH=/usr/binMAILTO="[EMAIL PROTECTED]"
 
0 9 * * 1-6 $PATH/killall fetchmail0 9 * * 1-6 
$PATH/fetchmail -d 300
 
0 17 * * 1-6 $PATH/killall fetchmail0 17 * * 
1-6 $PATH/fetchmail -d 3600
 
Hi! above is my cron setting ..I create .. But it 
does not work ...?
Can someone help me ...what is my mistake ... 
?
 
Best Regards,SKLIM+6012 391 
3638


[newbie] cron

2001-09-22 Thread Paul Rodríguez

ll putting a shell script in one of my cron folders execute it as root
if need be (how do I differentiate).  ANd how do I change frequency
(i.e. other than daily weekly or hourly).  Say, three time a day?

-Paul Rodríguez

On 23 Sep 2001 01:57:16 -0400, Paul Rodríguez wrote:
> How do I set up a cron job?  And how do I set the frequency?
> 
> -Paul Rodríguez
cron jobs


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Cron and Stuff

2001-09-08 Thread David E. Fox

> under the services to start both anacron and crond are setup to start on 
> bootup.  Are both of these services needed?  Also what exactly is 

I am not sure if both are needed. The crond should be the vixie-cron, since
that is more common on Linux systems (it is a version authored by Paul
Vixie, hence the name). Anacron seems to be specific to mandrake - I haven't
seen it used elsewhere yet. 

> Kevin

David E. Fox  Thanks for letting me
[EMAIL PROTECTED]change magnetic patterns
[EMAIL PROTECTED]   on your hard disk.
---



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[newbie] Cron run-parts /etc/cron.daily (fwd)

2001-01-24 Thread Meph Istopheles

  Hey,

  I keep getting this:


-- Forwarded message --
To: [EMAIL PROTECTED]
Subject: Cron  run-parts /etc/cron.daily
From: Cron Daemon <[EMAIL PROTECTED]>
Date: Wed, 24 Jan 2001 04:03:22 -0800 (PST)

DB2 problem...: missing or empty key value specified

  It shows up in my mail box (aliased from root) every morning.
I suspect it has something to do with the slocate package I'd
installed, but I'd installed it maybe three weeks before this
started showing.  I also went & edited cron.daily & removed some
seemingly superfulous info about directories, but that's back.

  I'd love to do away with whatever the problem is.

  Meph

-- 
  "I did this 'cause Linux gives me a woody."
  -Dave '-ddt->' Taylor, announcing DOOM for Linux





[newbie] Cron has gone mad !

2000-12-06 Thread Renaud OLGIATI

I have a cron job that (should) run every morning at 01.00 to run slocate,
to update the locate database.

For now two days, I have found my machine impossible to use, when I begin
at 06.00; constant HD activity, and everything taking ages to happen.

So I ctrl-alt-f1ed to the console, did a ps -a and found I have about fifty
or sixty pids for crond and slocate ! 

no wonder it was busy.

Any idea where this may come from ?

All worked well up to three days ago, the time/date is corect, and I'm
running out of ideas.

TIA,

Cheers,

Ron the Frog, on the banks of the Paraguay River.
 -- 
 
   Profund and/or witty statement goes here.
 
  ---  http://personales.conexion.com.py/~rolgiati  ---
 




Re: [newbie] cron error message

2000-12-02 Thread bascule

thankyou very much,

bascule

On Friday 01 December 2000  4:38 pm, you wrote:
> On Fri, 1 Dec 2000, bascule wrote:
>
> I figured that one out.
> In /etc/cron.daily there's a file called htdig-dbgen.
> Just chmod -x that and it's over with the messages.
>
> Paul
>
> >hi,
> >i am getting the message below regularly, i would be grateful if someone
> >could tell me if it is serious and how i might fix it?
> >
> 
> >
> >DB2 problem...: missing or empty key value specified




Re: [newbie] cron error message

2000-12-01 Thread Paul

On Fri, 1 Dec 2000, bascule wrote:

I figured that one out.
In /etc/cron.daily there's a file called htdig-dbgen.
Just chmod -x that and it's over with the messages.

Paul

>hi,
>i am getting the message below regularly, i would be grateful if someone
>could tell me if it is serious and how i might fix it?
>
>bascule
>
>Subject: Cron  run-parts /etc/cron.daily
>X-Cron-Env: 
>X-Cron-Env: 
>X-Cron-Env: 
>X-Cron-Env: 
>X-Cron-Env: 
>Message-Id: <[EMAIL PROTECTED]>
>Date: Wed, 29 Nov 2000 04:04:47 + (GMT)
>
>DB2 problem...: missing or empty key value specified
>
>
>
>

-- 
God must love crazy people.
He made so many of them!

http://nlpagan.net - ICQ 147208 - Registered Linux User 174403
 Linux Mandrake 7.2 - Pine 4.30





[newbie] cron error message

2000-12-01 Thread bascule

hi,
i am getting the message below regularly, i would be grateful if someone 
could tell me if it is serious and how i might fix it?

bascule

Subject: Cron  run-parts /etc/cron.daily
X-Cron-Env: 
X-Cron-Env: 
X-Cron-Env: 
X-Cron-Env: 
X-Cron-Env: 
Message-Id: <[EMAIL PROTECTED]>
Date: Wed, 29 Nov 2000 04:04:47 + (GMT)
 
DB2 problem...: missing or empty key value specified
  





Re: [newbie] Cron-tutorial

2000-11-05 Thread Sridhar Dhanapalan

Try running kcron (part of KDE). It makes the whole crontab creation process 
very simple. For a tutorial, go to http://mandrakeuser.org/admin/acron.html. 
MandrakeUser.org has great tutorials for most things you'll need.

On Mon,  6 Nov 2000 16:20, KompuKit wrote:
> Where can I find a good tutorial on setting up cron jobs,
> and/or editing them? I've never even touched that feature
> yet...and my box does all sorts of things...every night
> at 12 am.  I want to know what it's doing...and have it
> run at a different time. It runs for about 15 minutes...
> then sends me a "diff check" and a "security check"
> and Lord knows what else...

-- 
Sridhar Dhanapalan
"One World, One Web, One Programme." - Microsoft Promotional Ad.
"Ein Volk, Ein Reich, Ein Fuhrer." - Adolf Hitler




RE: [newbie] Cron-tutorial

2000-11-05 Thread Ran Hooper

Speaking of cron where can I track down this error? I checked
/etc/cron.daily and it's not there. Where else should I look?

error: syslog:114 duplicate log entry for /var/log/syslog


Regards,

Ran Hooper
[EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Paul
Sent: Sunday, November 05, 2000 9:51 PM
To: Linux-Mandrake
Subject: Re: [newbie] Cron-tutorial


It was Nov 6, 2000, 00:20, when KompuKit keyboarded:

>Where can I find a good tutorial on setting up cron jobs,
>and/or editing them? I've never even touched that feature
>yet...and my box does all sorts of things...every night
>at 12 am.  I want to know what it's doing...and have it
>run at a different time. It runs for about 15 minutes...
>then sends me a "diff check" and a "security check"
>and Lord knows what else...

man cron
man crontab
man 5 crontab

That is how I learnt. These man pages are quite understandable.

Btw, the 12 o'clock stuff is the system cron, stuff that is executed
located in /etc/cron.daily.

Paul

--
Gargoyle (n.): an olive-flavored mouthwash.

http://nlpagan.net - ICQ 147208 - Registered Linux User 174403
  -=PINE 4.21 on Linux Mandrake 7.1=-







Re: [newbie] Cron-tutorial

2000-11-05 Thread Paul

It was Nov 6, 2000, 00:20, when KompuKit keyboarded:

>Where can I find a good tutorial on setting up cron jobs,
>and/or editing them? I've never even touched that feature
>yet...and my box does all sorts of things...every night
>at 12 am.  I want to know what it's doing...and have it 
>run at a different time. It runs for about 15 minutes...
>then sends me a "diff check" and a "security check"
>and Lord knows what else...

man cron
man crontab
man 5 crontab

That is how I learnt. These man pages are quite understandable.

Btw, the 12 o'clock stuff is the system cron, stuff that is executed
located in /etc/cron.daily.

Paul

--
Gargoyle (n.): an olive-flavored mouthwash.

http://nlpagan.net - ICQ 147208 - Registered Linux User 174403
  -=PINE 4.21 on Linux Mandrake 7.1=-





[newbie] Cron-tutorial

2000-11-05 Thread KompuKit

Where can I find a good tutorial on setting up cron jobs,
and/or editing them? I've never even touched that feature
yet...and my box does all sorts of things...every night
at 12 am.  I want to know what it's doing...and have it 
run at a different time. It runs for about 15 minutes...
then sends me a "diff check" and a "security check"
and Lord knows what else...
-- 
 Registered Linux User:167369
<=KompuKit=>
Kit Goins   ICQ# 7110071
[EMAIL PROTECTED] Lowell, Mass.
Web Designerhttp://kitdesigns.bizhosting.com
WebServer:  http://kompukit.dyndns.org
(Server Runs between M - F 6pm-12am, S & S 12pm-12am EST)
<=KompuKit=>




Re: [newbie] Cron

2000-09-29 Thread Paul

It was Sep 29, 2000, 10:20, when Richard Davies keyboarded:

>
>59 22 * * * root passwd -l katrina
>00 23 * * * root halt
>00 8 * * * root passwd -u katrina

I think you should try and figure out a script to determine the PID of the
Xserver, and let cron do a kill -9 on that. That will kick the login out
of the blue!

Paul

--
Obeying their rules only encourages them to create new ones.
Disobey as often as possible:
for gain, for sport, for the art of it.
-Ethan Mordden

http://nlpagan.net - ICQ 147208 - Registered Linux User 174403
  -=PINE 4.21 on Linux Mandrake 7.1=-





[newbie] Cron

2000-09-29 Thread Richard Davies


Hi Larry,

> Let me see if I've got this straight.  Your wanting cron to run a script that will
> log an idle user off the system and return to the gui startup screen.  Right?  I'm
> not sure if cron is the best method though.  How will it determine that the user
> is not active and log them out while their working on something?

Wrong 23:00 is time little girls were in bed. I just want it to chuck her off
the system no matter what she is doing otherwise the little darling will sit up
all night playing games.

Line one locks her password so she can't get back onto the system when she has
been chucked off
Line two should return to the gui startup screen but I don't know how.
Line three enables her password again in the morning

Thanks for your help on this.
Richard Davies wrote:

I have written the following logged in as root crontab -e

59 22 * * * root passwd -l katrina
00 23 * * * root halt
00 8 * * * root passwd -u katrina

The first line works and locks katrina's password

The second line does nothing at all.  What I really want this to do if to drop
back to the login screen but I can't find the command for that. I thought that
halt, shutdown now, shutdown -n, poweroff,  init 0, while being overkill
should do the job. They don't

The third line works.

I have checked this by logging in as user and doing su katrina at 22:59 the
command stops working and at 08:00 starts again.

Any ideas what I have done wrong?

What I want this command to do is throw someone called katrina off the system
at 23:00 irrespective of what they are doing and keep them off the system until
08:00 the next day.

Katrina is a young girl who likes to get up at 02: and play computer games
making herself too tired for school in the morning. At present I just turn the
system off and take the power cord but there has to be an easier answer than
that.

 -- 
Regards,

Richard

Tollyboy Products International
http://www.tollyboy.com




-- 
Regards

Richard

http://www.tollyboy.com




[newbie] Cron job

2000-09-01 Thread Richard Davies

Hi,

I have written the following and I want cron to run it for me.  It is in a
file called /etc/cron.d/katrina

59 22 * * * root passwd -l katrina
00 23 * * * root halt
00 8 * * * root passwd -u katrina

The first line works and locks katrina's password
The second line does nothing at all.  What I really want this to do if to drop
back to the login screen but I can't find the command for that. I thought that
halt, shutdown now, shutdown -n now or poweroff, while being overkill should do
the job. They don't
The third line works.

I have checked this by logging in as user and doing su katrina at 22:59 the
command stops working and at 08:00 starts again.

Any ideas what I have done wrong?

-- 
Regards,

Richard

Tollyboy Products International
http://www.tollyboy.com






[newbie] Cron fails

2000-07-12 Thread Paul

Hi everyone,

I have changed the times on crontab this evening and restarted cron (all
as root of course, but "su"d in a window. Had to, since my computer is not
on at night when the cron-entries usually are run.

This is what I get when the hourly check runs:

-- Forwarded message --
Date: 12 Jul 2000 20:26:00 -
From: Cron Daemon <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Cron  root run-parts /etc/cron.hourly

/bin/bash: root: command not found


---
My crontab looks like this (I just changed the times to start things:)

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
[EMAIL PROTECTED]
HOME=/
 
# run-parts
26 * * * * root run-parts /etc/cron.hourly 
02 9 * * * root run-parts /etc/cron.daily 
22 9 * * 0 root run-parts /etc/cron.weekly 
42 9 1 * * root run-parts /etc/cron.monthly 
# Mandrake-Security:if you remove this comment, remove the next line
too.
0 9 * * *root/usr/share/msec/security.sh 


I had thought that this might be a problem because the system had not
reloaded crontab on boot, but this morning, just now, the very same thing
happened.

Any clues anyone?

Paul

-- 
We are the victims and instruments of cosmogenic love.
-C.G. Jung

)0([[EMAIL PROTECTED]])0(
http://nlpagan.net -  ICQ 147208
Registered  Linux  User   174403






Re: [newbie] CRON

2000-05-06 Thread Paul

On Fri, 5 May 2000, Nickolay Belostotsky wrote:

>And how do I run, say:
>
>hdparm -d1 /dev/hda
>
>on every startup?

Put it in /etc/rc.d/rc.local   (as root)

Paul

)0(---)0(

Happiness requires practice,
just like playing the violin.

)0([[EMAIL PROTECTED]]-)0(
http://nlpagan.net - ICQ 147208
Registered Linux User 174403




Re: [newbie] CRON

2000-05-06 Thread flupke

If you run mdk 7.0 or higher, there should be a line in your
/etc/rc.d/init.d/mandrake_everytime already containing the necessary
hdparms to optimize your hard drive.
Look at this script and modify it following your needs. I think it's the
best thing to do.

HTH
Flupke


On Fri, 5 May 2000, Nickolay Belostotsky wrote:

> And how do I run, say:
> 
> hdparm -d1 /dev/hda
> 
> on every startup?
> 
> Thanks
> 
> 




[newbie] CRON

2000-05-04 Thread Pete Clapham

Hi, all --

Have any of you configured a CRON table?  I would like to have our Linux Server 
perform a cleanup operation once each day, 
and CRON would seem to be the way to do this.  I have looked at the MAN tables for 
both CRON and CRONTAB, and they are 
all but undecipherable.  Can you advise me:

[1] Is CRON the right thing to use?

[2] What is the syntax for an operation call (call it CleanItUp) to be performed 
at 2:34 AM each day?

[3] What file does the above operation call go into?

Thank you very much for your help.

cheers,
pete



Pete Clapham
Department of Biological, Geological, and Environmental Sciences
Cleveland State University
Cleveland, Ohio, 44115

Phone: [216] 687-4820
Fax: [216] 523-7175
EMail:  [EMAIL PROTECTED]





[newbie] Cron fails after a day or so..

2000-01-07 Thread BryanMoorehead



I have had a single cron job that monitors my ip address running for quite some
time on my box with no problems.  A few days ago, I added a second job to

run "rdate -sp time.nist.gov" at specifc intervals.  It seems that after a day
or so, both jobs stop ( no email to root ), and crond returns

"can't lock /var/run/crond.pid, otherpid may be 412: Resource temporarily
unavailable"

Is it safe to delete crond.pid?

I just rebooted when this happened the other day, and it seemed to fix it, but I
don't want to reboot every day.

Any ideas as to what might be causing the lockup of cron?





[newbie] Cron fails after a day or so..

2000-01-05 Thread BryanMoorehead



I have had a single cron job that monitors my ip address running for quite some
time on my box with no problems.  A few days ago, I added a second job to

run "rdate -sp time.nist.gov" at specifc intervals.  It seems that after a day
or so, both jobs stop ( no email to root ), and crond returns

"can't lock /var/run/crond.pid, otherpid may be 412: Resource temporarily
unavailable"

Is it safe to delete crond.pid?

I just rebooted when this happened the other day, and it seemed to fix it, but I
don't want to reboot every day.

Any ideas as to what might be causing the lockup of cron?





  1   2   >