console message from Crontab run


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers console message from Crontab run
# 1  
Old 07-11-2007
console message from Crontab run

I run my nightly backup thru a crontab job. Is there any way to get the message to mount a new tape to the console? Currently it appears to go to an email.
# 2  
Old 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.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script fails to run properly when run from CRONTAB

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

2. UNIX for Dummies Questions & Answers

How to change crontab output from console to email?

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

3. Solaris

Hang when run command with /dev/console

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

4. Shell Programming and Scripting

How to change banner message for console login?

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

5. UNIX for Dummies Questions & Answers

how to stop the message on the console

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

6. Solaris

crontab to run every 20 second

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

7. Shell Programming and Scripting

WRITE a message in console

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

8. UNIX for Advanced & Expert Users

Send console message to all users and tty

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

9. Shell Programming and Scripting

Crontab Mail message

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

10. UNIX for Dummies Questions & Answers

console error message

: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
Login or Register to Ask a Question