LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-26-2004, 08:33 PM   #1
tryingHarder
LQ Newbie
 
Registered: Sep 2004
Posts: 2

Rep: Reputation: 0
Can not send cron output to the screen


I have been researching this for hours without success. I am trying to do what I thought was a simple task, but can not make it work. Here is what I am trying to:

I set up a cron job that runs a file that displays the uptime. I would like to send the the output to the screen and not to mail, or a file. I can do both now, but have not been able to find a way to sent the output to the screen. If possible I would like to send the output to both the screen and to a file.

To send to a screen I am doing this:
0 * * * * /home/user/file > /var/log/file 2>&1

What I need is to be able to also send the output to the screen. I know it is possible.
Thanks, tryingHarder
 
Old 09-26-2004, 09:33 PM   #2
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
Try the command "xmessage"
It displays a dialogue box, and you can have the output of commands displayed.

man xmessage for details

--Ian
 
Old 09-26-2004, 10:07 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Xmessage works if there's an X Windows GUI running. If there isn't, such as on a server box, you ccan try sending the output to /dev/tty1 (the terminal device), e.g. echo foo > /dev/tty1. Make sure the cron job runs as someone with write access to the tty device.
 
Old 09-26-2004, 11:11 PM   #4
tryingHarder
LQ Newbie
 
Registered: Sep 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Unhappy

This was the correct answer to my quesiton about sending cron output to the screen:

Xmessage works if there's an X Windows GUI running. If there isn't, such as on a server box, you ccan try sending the output to /dev/tty1 (the terminal device), e.g. echo foo > /dev/tty1. Make sure the cron job runs as someone with write access to the tty device.

This is really a great place to learn about linux!

TryingHarder
 
  


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
how to make cron not send email? bbeers Slackware 7 11-11-2005 11:31 AM
cron output nelamvr6 Linux - Newbie 3 10-18-2005 08:11 PM
Cron job , send email mikeshn Linux - General 1 09-21-2003 10:02 AM
cron output? sk8guitar Linux - General 4 08-15-2003 02:55 PM
Understanding CRON output lhoff Linux - General 1 05-19-2003 02:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:34 PM.

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