On Mon, 28 Jul 2003, Stuart Clark wrote:

> I recently had a Linux exam
>  
> One of the questions was
>  
> Make a cron job print the message "hello" to stdout at 4:15 am every
> day.
>  
> So I added this line to /etc/crontab
>  
> 15 04 * * * root /bin/echo "hello"
>  
>  
> Is this the right answer?
>  
> The reason why I ask is because I think of stdout as being the screen
>  
> If I put 
>  
> 01 * * * * root /bin/echo "hello" 
>  
> into /etc/crontab I don't see the work hello on the screen every minute.

that appears to be a *very* badly-worded question since, when
you submit a cron job, it's not clear *what* stdout corresponds to.

if you knew where you were going to be logged in, you could
run a command and add the redirection ... > /dev/tty1, or whatever
your tty port is.  that would definitely work.

other than that, i'd have to say your answer was acceptable,
since i don't see any other way of doing it that makes the
idea of "stdout" meaningful.

rday


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to