![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems . |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-20-2007 01:52 AM |
| Debian: doubt in "top" %CPU and "sar" output | jaduks | Debian | 0 | 09-12-2007 08:05 AM |
| Unix "at" / "Cron" Command New Problem...Need help | Mohanraj | UNIX for Dummies Questions & Answers | 3 | 01-26-2006 08:08 PM |
| Running "wall" command from cron | xadamz23 | Shell Programming and Scripting | 1 | 05-27-2005 08:43 PM |
| Pine UNIX email -- old messages labeled "New" | sean_oconnor | UNIX for Dummies Questions & Answers | 1 | 08-01-2001 01:55 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Duplicate output from "cron" messages
Few days ago I tried to fix an error in the crontab entry, basically I just add the complete path to run a script and remove an unused script from the crontab. I use crontab -e and mv FIFO FIFO.old command then cron start as cron won't start until I delete or move FIFO. I didn't know that using crontab -e should be enough.
Since then, I got duplicate messages regarding with output from "cron" messages. Even, I got report from scripts that I have already removed from the cron jobs. Can someone help me why it happens and how to solve this problem? Another question is about >/dev/null 2>&1. I thought by adding this text to the last of a line in a crontab will avoid crontab from sending Output from "cron" message. However, I still get the message. Did I miss something ? |
|
||||
|
Re: Duplicate output from "cron" messages
You're right.
Following is the output if I run the command: ps -ef | grep cron | grep -v grep root 5217 1 0 Nov 07 ? 0:05 cron start root 19921 1 0 Nov 04 ? 0:07 cron start root 22232 1 0 Nov 08 ? 0:05 cron stop root 6368 1 0 Nov 07 ? 0:05 cron start root 5667 1 0 Nov 07 ? 0:06 cron start root 22304 1 0 Nov 08 ? 0:05 cron stop root 6704 1 0 Nov 07 ? 0:05 cron start root 26238 1 0 Nov 01 ? 0:08 /usr/sbin/cron root 7289 1 0 Nov 07 ? 0:05 cron start root 19916 1 0 Nov 04 ? 0:07 cron stop root 22368 1 0 Nov 08 ? 0:05 cron start I've killed all the process, except for the following three: root 22304 1 0 Nov 08 ? 0:05 cron stop root 26238 1 0 Nov 01 ? 0:08 /usr/sbin/cron root 22368 1 0 Nov 08 ? 0:05 cron start Should I kill 22304 and 22368? I've also deleted FIFO.old |
|
||||
|
Re: Duplicate output from "cron" messages
I've killed all the process and I started a new process by running
/usr/sbin/cron start The output of ps -ef| grep cron | grep -v grep is as follow: root 5255 1 0 14:19:09 ? 0:00 /usr/sbin/cron start If this still doesn't work, I will ask for my supervisor's permission to reboot the server. |
|
|||||
|
A reboot would clean up everything, but the real problem is the way you are stopping and starting cron. Look at the man page for cron - there is no option for start (or stop). It even mentions that cron should only be executed once.
You need to use the startup script - look in /etc/rc2.d for S75cron (the number could be different) - use it. /etc/rc2.d/S75cron start You also can use it to stop cron /etc/rc2.d/S75cron stop |
|
||||
|
Re: Duplicate output from "cron" messages
Thanks,
I think it's fine now. I just kill cron start process and run /usr/bin/cron instead. I'm just wondering about cron stop and cron start. I saw a few sites still telling us to do this command to restart cron. Is this only valid for previous version of Solaris ?? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|