On Solaris crontabs are found in /var/spool/cron/crontabs . Assuming you want
the cron job to run as root, simply add a line to the bottom of
/var/spool/cron/crontabs/root with the details of the job. The easiest way to
do this, assuming you have X running is to do this:
export EDITOR=gedit
crontab -e
This will then open the currently logged in user's crontab in the Gnome text
editor. If you don't have X running, just use:
crontab -e
The crontab file with then be opened in vi.
The format of the line is:
minute hour day-of-month month day-of-week command-to-run
For example, this line:
10 3 * * * /usr/sbin/logadm
will start /usr/sbin/logadm every day at 3:10am. For more details see the man
pages for cron and crontab ("man crontab", "man cron").
Cheers
Andrew.
This message posted from opensolaris.org