[rescue] Speaking of backups, scripting division

Mike F lists at mikef.dyndns.org
Mon Nov 11 08:53:57 CST 2002


----- Original Message ----- 
From: "Tim H." <lists at pellucidar.net>
To: <rescue at sunhelp.org>
Sent: Sunday, November 10, 2002 1:57 PM
Subject: Re: [rescue] Speaking of backups, scripting division

> */5 in the minute field
> 
> is the same as 
> 
> 0,5,10,15,20,25,30,35,40,45,50,55
> 
> and days of week and month can be text or numbers IIRC.

I can confirm this (*/x) works under OpenBSD and FreeBSD, but
I haven't been able to make it work under Solaris 9. I have
a script that I want to be run every 2 hours. So I put

0 */2 * * * /usr/sbin/myscript

in root's crontab, and upon saving the crontab, I get an
error of "unexpected character found in line." Same thing
happens if I try:

0 0-23/2 * * * /usr/sbin/myscript

However, everything works fine with:

0 0,2,4,6,8,10,12,14,16,18,20,22 * * * /usr/sbin/myscript

but I find it rather limiting that I can't have cron entries
that simply specify the interval. While I'm on the same subject
(sort of) does Solaris have a way to non-interactively specify
the subject of a mail message, like:
`mail -s "This is the subject" recipient` ? I like it when my
scripts are run to say something like "Output for `date`" in the
subject; on BSD machines I can just use a mail -s in the
crontab, but Solaris doesn't seem to like the -s switch.

Regards, MF



More information about the rescue mailing list