DO and Crontab
DO and Crontab
- Subject: DO and Crontab
- From: Julien Jalon <email@hidden>
- Date: Thu, 4 Oct 2001 18:31:41 +0200
I already got this kind of problem when using Distributed Object:
Under certain conditions, the connection does not work.
Last example for me:
in the source of a tool of mine (client side launched by cron):
theServer=[NSConnection connectionWithRegisteredName:MYCONNEXIONNAME
host:nil];
when invoked directly with the terminal, it does connect and it works.
when invoked by cron, theServer is nil.
The server is launched at boot time.
I thought that it was a difference in the environment variables so I
compared those variables in the two cases (Thanks FileMerge, beautiful
front-end for diff... and it already was in NeXTStep days!) :
the only differences were in :
$$ (Process ID, normal)
$COLUMNS (80 in Terminal, 0 in Cron)
$LINES (50 in Terminal, 0 in Cron)
$PPID (Parent Process ID, normal)
$TERM (vt100 in Terminal, '' in Cron)
$TERMCAP (vt100 termcap in Terminal, no such variable)
$TTY (/dev/ttyp2 in Terminal, '' in Cron)
$TTYIDLE (0 in Terminal, -1 in Cron)
Everything else is the same (USER, UID, GID, etc.)
I think the only real difference is the TTY variables.. but I don't
understand what it may have something related with DO.
--Julien Jalon