The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
crontab problem DebianJ UNIX for Advanced & Expert Users 11 05-22-2009 01:56 AM
Crontab problem jess_t03 AIX 3 05-22-2009 01:42 AM
problem with crontab cleansing_flame UNIX for Dummies Questions & Answers 1 01-29-2008 08:02 PM
Run crontab job problem ust UNIX for Advanced & Expert Users 3 07-23-2007 09:45 PM
Problem with Crontab Zak UNIX for Dummies Questions & Answers 2 12-20-2005 05:44 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-14-2008
cleansing_flame's Avatar
cleansing_flame cleansing_flame is offline
Registered User
  
 

Join Date: Nov 2007
Location: NYC
Posts: 37
Problem with crontab

I'm trying to get crontab to run a script, but to test crontab I tried out a very simple command: `echo bob`

here is my crontab file (I edited it by using `crontab -e`):
-----------------
#!/bin/sh

23 10 * * * echo bob

and at 10:23 every day I get a new message:
in /var/mail/a
--------------------

From a@c.b.org Fri Dec 21 10:23:01 2007
Return-Path: <a@c.b.org>
X-Original-To: a
Delivered-To: a@c.bob.org
Received: by a.b.org (Postfix, from userid 501)
id 56D5023B5C3; Fri, 21 Dec 2007 10:23:01 -0500 (EST)
From: a@c.b.org (Cron Daemon)
To: a@c.b.org
Subject: Cron <a@c> echo bob
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=a>
X-Cron-Env: <USER=a>
X-Cron-Env: <HOME=/Users/a>
Message-Id: <20071221152301.56D5023B5C3@c.b.org>
Date: Fri, 21 Dec 2007 10:23:01 -0500 (EST)

bob
---------------------

at least it does my command, however I was hoping that I would be able to have it output to on the screen I'm on, instead of having to go and check my "mail". If anyone can help that would be great
  #2 (permalink)  
Old 01-14-2008
shai.z shai.z is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 3
you can redirect the output to the console.
if you are connected using a remote terminatl (telnet, putty etc.) you will have to redirect it to the active pty.
  #3 (permalink)  
Old 01-14-2008
cleansing_flame's Avatar
cleansing_flame cleansing_flame is offline
Registered User
  
 

Join Date: Nov 2007
Location: NYC
Posts: 37
Quote:
Originally Posted by shai.z View Post
you can redirect the output to the console.
if you are connected using a remote terminatl (telnet, putty etc.) you will have to redirect it to the active pty.
how do i do that ? do i use $2?
  #4 (permalink)  
Old 01-14-2008
shai.z shai.z is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 3
echo "hello" > /dev/console
or
echo "hello" > /dev/pts/X
(x = your active terminal)

google for "unix redirection" for more information, you can redirect also errors, outputs and so so on.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:16 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0