Re: Executing from crontab only does the job when I logged on.

Previous thread: removing unneeded package dependencies by Dmitrij D. Czarkoff on Monday, December 27, 2010 - 7:35 am. (6 messages)

Next thread: CITOYENNETE IMMIGRATION CANADA by information cic.canada (via Multiply) on Monday, December 27, 2010 - 7:21 am. (1 message)
From: Orestes Leal R.
Date: Monday, December 27, 2010 - 8:35 am

Hi folks, I have setup a 2 crontabs jobs,

one it's a compiled C program that checks if the pop3 server responds, if  
so it's die,
if not it restart the pop3 server.

and the other it's the same but for smtp server.

the 2 programs work ok, but the do not execute from crontab when I logged  
out from console,ssh.
but when I logged on into an ssh session or console session then execute.

it this behavior right?

I'm using 4.3

LeaL

From: Philip Guenther
Date: Monday, December 27, 2010 - 9:05 am

On Mon, Dec 27, 2010 at 7:35 AM, Orestes Leal R.

4.3 has been out of support for almost 20 months.  You've apparently
chosen to continue using it instead of upgrading, so supporting it is
your problem.  Good luck!  I suggest you check the log file for cron
(read the cron(8) manpage for details).


Philip Guenther

From: Orestes Leal R.
Date: Monday, December 27, 2010 - 10:02 am

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/

From: Philip Guenther
Date: Monday, December 27, 2010 - 9:30 am

On Mon, Dec 27, 2010 at 9:02 AM, Orestes Leal R.

...and yet you seem to have ignored my suggestion to read the cron
log.  Surprise: the same suggestion applies to 4.8!

So, read the logs, describe your setup more completely such as by
including a full dmesg.  Right now, we don't know what architecture
this is, whether virtualization is involved, what user are these
cronjobs set up as, how you confirmed that they are running when
you're logged in, nor how you confirmed that they are *not* running
when you are not logged in.

Without details, I don't see any way to help you other than guessing,
so here's my random guess: it's obviously a bug in your virtualization
setup.  (You didn't say it _isn't_ such a setup, so I could be right.)



Philip Guenther

From: Orestes Leal R.
Date: Monday, December 27, 2010 - 10:27 am

no virtualization, i386, I already read the manpage of cron,
didn't say anithing that apply to this situation.


-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/

From: bofh
Date: Monday, December 27, 2010 - 9:43 am

He said read cron logs, not man page...


-- 
http://www.glumbert.com/media/shift
http://www.youtube.com/watch?v=tGvHNNOLnCk
"This officer's men seem to follow him merely out of idle curiosity."  --
Sandhurst officer cadet evaluation.
"Securing an environment of Windows platforms from abuse - external or
internal - is akin to trying to install sprinklers in a fireworks factory
where smoking on the job is permitted."  -- Gene Spafford
learn french:  http://www.youtube.com/watch?v=30v_g83VHK4

From: Martin Schröder
Date: Monday, December 27, 2010 - 11:33 am

Programs started by cron will have a different env(1) than those
started from interactive sessions; most notabily $PATH will be
different.

Best
   Martin

From: Orestes Leal R.
Date: Monday, December 27, 2010 - 12:41 pm

On Mon, 27 Dec 2010 12:33:25 -0600, Martin Schrvder <martin@oneiros.de>

Is there any restriction on accesing networks sockets from cron?

From: Joachim Schipper
Date: Monday, December 27, 2010 - 12:38 pm

There are no such restrictions that do not also restrict programs
started from the shell by/as the same user.

		Joachim

-- 
PotD: databases/pgfouine - PostgreSQL log analyzer
http://www.joachimschipper.nl/

From: Eric Furman
Date: Monday, December 27, 2010 - 6:22 pm

On Mon, 27 Dec 2010 13:41 -0600, "Orestes Leal R."

No, this is not normal behavior for cron on ANY flavor of UNIX.
Sounds like a good guess, Martin, but no one can know because he
still refuses to give any of the info he was asked for.
Any real info at all, actually.

From: roberth
Date: Monday, December 27, 2010 - 8:11 pm

On Mon, 27 Dec 2010 20:22:30 -0500

Expecting any real info whatsoever on misc@ seems to be futile.
A guess is as much as they can or want to expect.
Perhaps it's some kind of recruitment scheme.
(On the other hand, they might just have gone to bed.)

Previous thread: removing unneeded package dependencies by Dmitrij D. Czarkoff on Monday, December 27, 2010 - 7:35 am. (6 messages)

Next thread: CITOYENNETE IMMIGRATION CANADA by information cic.canada (via Multiply) on Monday, December 27, 2010 - 7:21 am. (1 message)