07-11-2007
EDIT : I guess I'm not 100% certain for your question, I thought that you want output of the cron command to be printed onto terminal, if yes, read my suggestion below, if not, please disregard.
________________________________
I think yes, just pipe the command like :
0 * * * * * /your-script possible parameters | wall
depending on your system type and with respective parameters. Read the man pages for wall, which actually will write the message to all users, so it may not be a good solution.
Instead, you can use "write" if present, from "man write" :
Quote:
NAME
write - write to another user
SYNOPSIS
write user [terminal]
It will be good if you test the command from CLI first, before adding it to cronjob.
I can't think of anything more usable at this moment, there may be more efficient solutions.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
:confused: I receive the following error message when I try to logon to my Solaris 2.6 system;
"No utmpx entry. You must exec "login" from lowest level "shell" "
What does it mean ? I can't logon to the system at the moment!
Any help appreciated.
Regards (3 Replies)
Discussion started by: boristhespider
3 Replies
2. Shell Programming and Scripting
Hi
When I make change in crontab entries , I get below message as a mail. Can any one tell me what this indicates?
*********************************************
From wlsdev05 Fri Sep 22 02:11:23 2006
Date: Fri, 22 Sep 2006 02:11:23 -0400 (EDT)
From: "Geff Thomson - " <wlsdev05>... (1 Reply)
Discussion started by: pankajkrmishra
1 Replies
3. UNIX for Advanced & Expert Users
Hi people,
i tried to search in the forum... but didnt found the answer...
Sometimes i need to send a console message to all users in all tty, like reboot or shutdown does...
But i cant find how to do that.
Someone know?
Thanks a lot (2 Replies)
Discussion started by: gfca
2 Replies
4. Shell Programming and Scripting
Hi all,
I have a requirement, where I need to do some calculations and based on the results I need to write a message to the user from a shell script.
Is it possible to `write' inside the script? Something like the below one..
#! /bin/ksh
write user12 << EOF
Hello World
<<EOF
For... (2 Replies)
Discussion started by: guruparan18
2 Replies
5. Solaris
Hi experts,
I want to set the crontab for my script which will run every 20 seconds
I think below could be the possible one-
*/3 * * * * /export/home/username/scripts/runing.sh
As my system(SOLARIS 9) is live- i am confused to implement before make sure !!!
I need... (4 Replies)
Discussion started by: thepurple
4 Replies
6. UNIX for Dummies Questions & Answers
Hi,
Sun Solaris. I am working on the console, I have pulled the network cable out. I am in the process of changing the IP address and few others thing. But this message comes every few seconds.
SUNW,hme0: Link Down - cable problem?
SUNW,hme0: Link Down - cable problem?
It's very... (2 Replies)
Discussion started by: samnyc
2 Replies
7. Shell Programming and Scripting
Hi All,
Whenever I login to server via console, after providing username (root) it displays a banner message. I want to remove this message
Serverabc : root
Welcome to Server !!!
Password:
It is Centos 5.4 box.
I have checked /etc/issue and /etc/motd. It does not... (8 Replies)
Discussion started by: kalpeer
8 Replies
8. Solaris
hi guys,
I don't know why I run this command:
echo a>/dev/console
It is not responsed from console and hang. If I run echo a>/dev/null, it is OK.
here it is the console file:
mcl1101 root#ls -ltr /dev/console
lrwxrwxrwx 1 root other 30 Aug 18 2009 /dev/console ->... (4 Replies)
Discussion started by: caspian
4 Replies
9. UNIX for Dummies Questions & Answers
Hi,
We are currently running AIX 6.1 TL4. There are around 30 ksh scripts that are ran from crontab which if an error occurs or a problem with an ftp unix sends the out of the ksh script which goest to our console via the local user hci which is viewed by the mail command. I've tired adding... (2 Replies)
Discussion started by: hgjdv
2 Replies
10. Shell Programming and Scripting
Hello all,
I'm trying to write a script to gather and send data and it works just fine at the bash command line, but when executing from CRON, it does not run properly.
My scripting skills are pretty limited and there's probably a better way, but as I said it works at the command line, but... (12 Replies)
Discussion started by: rusman
12 Replies
LEARN ABOUT REDHAT
crontab
CRONTAB(1) General Commands Manual CRONTAB(1)
NAME
crontab - maintain crontab files for individual users (V3)
SYNOPSIS
crontab [ -u user ] file
crontab [ -u user ] { -l | -r | -e }
DESCRIPTION
Crontab is the program used to install, deinstall or list the tables used to drive the cron(8) daemon in Vixie Cron. Each user can have
their own crontab, and though these are files in /var, they are not intended to be edited directly.
If the allow file exists, then you must be listed therein in order to be allowed to use this command. If the allow file does not exist but
the deny file does exist, then you must not be listed in the deny file in order to use this command. If neither of these files exists,
then depending on site-dependent configuration parameters, only the super user will be allowed to use this command, or all users will be
able to use this command.
If the -u option is given, it specifies the name of the user whose crontab is to be tweaked. If this option is not given, crontab examines
"your" crontab, i.e., the crontab of the person executing the command. Note that su(8) can confuse crontab and that if you are running
inside of su(8) you should always use the -u option for safety's sake.
The first form of this command is used to install a new crontab from some named file or standard input if the pseudo-filename ``-'' is
given.
The -l option causes the current crontab to be displayed on standard output.
The -r option causes the current crontab to be removed.
The -e option is used to edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables. After you exit
from the editor, the modified crontab will be installed automatically.
SEE ALSO
crontab(5), cron(8)
FILES
/etc/cron.allow
/etc/cron.deny
STANDARDS
The crontab command conforms to IEEE Std1003.2-1992 (``POSIX''). This new command syntax differs from previous versions of Vixie Cron, as
well as from the classic SVR3 syntax.
DIAGNOSTICS
A fairly informative usage message appears if you run it with a bad command line.
AUTHOR
Paul Vixie <paul@vix.com>
4th Berkeley Distribution 29 December 1993 CRONTAB(1)