• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How to do crontab with Solaris?

Almighty1

Senior member
Does anyone know how to do the crontab job for Solaris on a x86 platform like to run a job on every reboot of the machine? In FreeBSD, it's just @reboot username command

 
You want the easy way?🙂 Grab Webmin. It supports mucho OS's, including Solaris. You can remotely manage it too.

From their page:



<< The best supported systems at the moment are Solaris, Linux (Redhat in particular) and FreeBSD. >>



😀

Russ, NCNE
 
Heh, webmin is cool but isn't there a way to do it with crontab itself? I think for Linux, the best is still Debian 🙂 Okay, I've used SLS linux before FreeBSD existed since 386bsd was bad those days.... but FreeBSD have been solid in performance, stability, and reliability for the last 8 years =)

 
Almighty1 - I can't speak for how Solaris would restart at boot but with linux, you can either add things in /etc/rc.d/init.d/<run level files> (where you can set services to stop/start at a certain runlevel during boot) OR an easier way is the fact that many of the distros have a rc.local (or similarly named fle) where you can execute commands at boot AFTER the aforementioned run level services have executed.

The linux crontab jobs generally run while the machine is up.
 
Almighty1,

You can manage cron jobs and boot processes (as well as a billion other things) with Webmin. In other words, you don't have to know how to do it in Solaris, just install Webmin and access the appropriate module.

For example: On a Linux box, you'd just go in to System/Scheduled Cron Jobs to add/delete/edit/run any jobs. Same thing for Bootup and Shutdown processes. I would assume it's similar in Solaris.

The proggie would be particularly useful in your situation because it can be remotely accessed and used.

Now, I know you *nix geeks really like to do things the hard way, but I like better mousetraps myself.🙂

Russ, NCNE
 
LOL Russ!

I think Webmin was one of the first apps I found and installed about a year ago... Although I haven't used it much anymore (probably because I couldn't get it to configure Samba correctly for me... at least the version I had back then... 🙁).
 
crontab is for time specific jobs, it is indeed the RC<x>.d directories you are interested in, just put a script that runs the job in the relavant run level diretory called S<xx><JobName> where the xx = a higher number than anything else, so it runs last, but must be less than 100, and the JobName can be anything you like, S = start and K = kill, dont forget to make it executable (and to test it unless you have . in the path you will need to type ./S<xx><JobName> to run it)

Hope this helps if you dont get web thing to work.
 
setenv EDITOR vi
crontab -e

edit to your liking. Do a &quot;man crontab&quot; for detailed info.

However, it sounds like what you really want is a script that runs at boot time:

cd /etc/rc3.d
vi s90foobar (choose any name that starts with &quot;s&quot; and a number).

-Nexus9


&quot;We don't need no steenking webmin...&quot;
 
nex: not forgetting to type csh first as the default shell under Solaris is Korn as opposed to 'C' shell (as setenv is a 'C' shell command)
 
Back
Top