LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 09-07-2010, 05:44 AM   #1
sathish167
LQ Newbie
 
Registered: Sep 2010
Posts: 5

Rep: Reputation: 0
directing cron output to terminal screen


Hi All

I am trying to display a text using crontab. My settings :
*/2 * * * * /bin/echo "hello"
This setting sends a mail to the user, instead of displaying on the screen. Now tried changing the setting to:
*/2 * * * * /bin/echo "hello" > /dev/tty1
Now I can see the text on the screen, but this setting comes with a catch. What would happen if the user changes the terminal. for instance if he gets into tty2, he wont have write access on tty1. So the user gets a mail saying "permission denied". Is there any way that I can force the user to use a particular terminal or can a cron job be set in a way such that the user would get the text irrespective of the terminal he logs in.

Thanks in advance
Cheers..
 
Old 09-07-2010, 05:59 AM   #2
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Quote:
Originally Posted by sathish167 View Post
Hi All

I am trying to display a text using crontab. My settings :
*/2 * * * * /bin/echo "hello"
This setting sends a mail to the user, instead of displaying on the screen. Now tried changing the setting to:
*/2 * * * * /bin/echo "hello" > /dev/tty1
Now I can see the text on the screen, but this setting comes with a catch. What would happen if the user changes the terminal. for instance if he gets into tty2, he wont have write access on tty1. So the user gets a mail saying "permission denied". Is there any way that I can force the user to use a particular terminal or can a cron job be set in a way such that the user would get the text irrespective of the terminal he logs in.

Thanks in advance
Cheers..
Normally cron send output(error also) into mail.


have a look at below link.

http://www.linuxquestions.org/questi...rminal-727737/

Last edited by sem007; 09-07-2010 at 06:05 AM. Reason: add link
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirect ALL terminal output to file and screen (for entire session) Mountain Linux - Software 9 07-08-2010 10:50 AM
Directing Script output to Memory but without using a pipe | telecom_is_me Programming 4 06-29-2008 12:17 AM
Directing sound output to microphone Night Ink Linux - Software 2 12-28-2007 12:52 AM
Directing xosd output to X display from crontab BWebb Linux - General 3 06-30-2005 01:09 PM
Can not send cron output to the screen tryingHarder Linux - Newbie 3 09-26-2004 10:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 03:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration