[j-nsp] Generating events based on day of week
Alexander Shikoff
minotaur at crete.org.ua
Fri Oct 30 07:06:27 EDT 2009
On Thu, Oct 29, 2009 at 11:01:50AM -0400, Phil Shafer wrote:
> Alexander Shikoff writes:
> >Event script change-policer.slax is very simple, it accepts 4 params,
> >and I suppose that placing checks of day of week/month in it is not
> >right way.
>
> I think putting the logic for weekdays, holidays, etc in the
> script is a reasonable approach.
In spite of all my respect for you let me to not agree with you.
It is not reasonable approach. Let's think about what might be if Unix cron
had no possibility to configure days of month and days of week.
Then everyone would call script from cron (every 1-5-10 minutes
for more accuracy) and then check date in the script instead of calling
it exactly at necessary day. Moreover, checks of date would be added
to _every script_. And that is called "reasonable approach"?
It is great JunOS works over BSD. And there is a workaround.
1. Turn event-script to op-script
2. Start shell and edit crontab. Put line "/usr/sbin/cli op <your-script> <arguments>" in
crontab at necessary date/time.
3. Enjoy the power of Unix.
--
MINO-RIPE
More information about the juniper-nsp
mailing list