[NTLUG:Discuss] testing and results Re: crontab issue

Fred James fredjame at fredjame.cnc.net
Wed Mar 14 19:58:39 CDT 2007


All
First, a thank you to everyone who responded with suggestions.  I used 
those suggestions to put together a series of test and I include a brief 
description of the whole thing herein.  Unless someone has a further 
suggestion, it looks like I could live with number 6 and redirect stderr 
to /dev/null.

Thank you in advance for any help you may be able to offer
Regards
Fred James

[Test description]
I put 9 lines into the crontab (like those shown below) and I have 
grouped the results in the three main categories (also below).  To 
summarize however, number 6 while producing error messages, is the only 
one that used both the arguments and the user's environmental variables.

[error messages]
1-5 had no error messages
6-7 each had two error messages: stdin: is not a tty, and: TERM 
environment variable not set.
8-9 each had one error message: stdin: is not a tty

[arguments]
1,2,and 6 used the arguments
3,5,7,and 9 had no arguments given, so of course they did use them
4,and 8 had arguments but didn't use them

[user's environment (.profile)]
1-5 did not use the user's environmental values
6-9 did use the user's environmental values

(1) 5 * * * * /username/program 1 2 3 4 5 one two three four 2> 
/tmp/errorfile1
(2) 6 * * * * su username /username/program 1 2 3 4 5 one two three four 
2> /tmp/errorfile2
(3) 7 * * * * su username /username/program 2> /tmp/errorfile3
(4) 8 * * * * su username -c /username/program 1 2 3 4 5 one two three 
four 2> /tmp/errorfile4
(5) 9 * * * * su username -c /username/program 2> /tmp/errorfile5
(6) 10 * * * * su - username /username/program 1 2 3 4 5 one two three 
four 2> /tmp/errorfile6
(7) 11 * * * * su - username /username/program 2> /tmp/errorfile7
(8) 12 * * * * su - username -c /username/program 1 2 3 4 5 one two 
three four 2> /tmp/errorfile8
(9) 13 * * * * su - username -c /username/program 2> /tmp/errorfile9




More information about the Discuss mailing list