Link to home
Create AccountLog in
Unix OS

Unix OS

--

Questions

--

Followers

Top Experts

Avatar of amit_g
amit_g🇺🇸

How to restart cron on Sun OS 5.10
How to restart cron on Sun OS 5.10 without restarting the server? The system administrator used

/etc/cron restart

and killed the FIFO file. I believe now it is running two cron daemons as the log show each scheduled script being run twice. ps -f grep cron shows

    root  6147     1   0   Dec 29 ?           0:01 /usr/sbin/cron
    root  7377     1   0   Dec 29 ?           0:01 /etc/cron restart

The log file example

>  CMD: /somedir/subdir/script1>/dev/null 2>&1
>  root 24236 c Tue Jan  5 04:00:00 2010
>  CMD: /somedir/subdir/script2>/dev/null 2>&1
>  root 24237 c Tue Jan  5 04:00:00 2010
>  CMD: /somedir/subdir/script3>/dev/null 2>&1
>  root 24240 c Tue Jan  5 04:00:00 2010
>  CMD: /somedir/subdir/script1>/dev/null 2>&1
>  root 24258 c Tue Jan  5 04:00:00 2010
>  CMD: /somedir/subdir/script2>/dev/null 2>&1
>  root 24259 c Tue Jan  5 04:00:00 2010
>  CMD: /somedir/subdir/script3>/dev/null 2>&1
>  root 24266 c Tue Jan  5 04:00:01 2010

The uname -a returns

SunOS ServerName 5.10 Generic sun4u sparc SUNW,Sun-Fire-V240

ls -l /etc/init.d/cron returns

/etc/init.d/cron: No such file or directory

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


ASKER CERTIFIED SOLUTION
Avatar of larsrohrlarsrohr🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of amit_gamit_g🇺🇸

ASKER

What is /system/cron? There is no cron in /system.

Avatar of amit_gamit_g🇺🇸

ASKER

Nevermind, should have read svsc man before posting :)

Avatar of larsrohrlarsrohr🇺🇸

Yup, the 'svc:/system/cron:default' is the full FMRI (fault management resource identifier).
The following abbreviated version should also work:
  svcadm restart cron

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


SOLUTION
Avatar of Brian UtterbackBrian Utterback🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

Avatar of AmolAmol🇮🇳

svcadm restart -t system/cron:default

Avatar of amit_gamit_g🇺🇸

ASKER

Worked like a charm. For the duplicate cron, the processes were killed using kill. Thanks everyone.
Unix OS

Unix OS

--

Questions

--

Followers

Top Experts

Unix is a multitasking, multi-user computer operating system originally developed in 1969 at Bell Labs. Today, it is a modern OS with many commercial flavors and licensees, including FreeBSD, Hewlett-Packard’s UX, IBM AIX and Apple Mac OS-X. Apart from its command-line interface, most UNIX variations support the standardized X Window System for GUIs, with the exception of the Mac OS, which uses a proprietary system.