Sponsored Content
Full Discussion: Day_of_the_week
Top Forums UNIX for Dummies Questions & Answers Day_of_the_week Post 302529102 by ctsgnb on Wednesday 8th of June 2011 01:37:52 PM
Old 06-08-2011
If you run it in control-M, you should be able to run it in the desired time frame, without of taking care of the start time inside the script

You could just add at the beginning of your script :

Code:
[[ -f /tmp/flag/MAINTENANCE ]] && exit 1

And before beginning your maintenance :

Code:
touch /tmp/flag/MAINTENANCE

and remove that flag at the end of your maintenance

Otherwise, schedule it in Control-M and before starting your maintenance, freeze it / unschedule it temporary until you get finished with your maintenance.

I don't know Control-M but i am almost 100% sure such kind of scheduler has some option or other ways for calendar based schedule or time frame windows definition/exclusion, that would make possible to set up such a schedule constraints in one way or another.

I think you should investigate on Control-M possibilities at first since those sort of tools have been design to achieve exactly this kind of task.

Last edited by ctsgnb; 06-08-2011 at 02:56 PM..
 
WEEKLY(5)						      BSD File Formats Manual							 WEEKLY(5)

NAME
weekly, weekly.conf -- weekly maintenance DESCRIPTION
The /etc/weekly script is run, by default, every Saturday morning on a NetBSD system. The /etc/weekly.conf file specifies which of the stan- dard weekly services are performed. The variables described below can be set to ``YES'' or ``NO'' in the /etc/weekly.conf file. The default settings are in the /etc/defaults/weekly.conf file. (Note that you should never edit /etc/defaults/weekly.conf directly, as it is often replaced during system upgrades.) rebuild_locatedb This rebuilds the locate(1) database, /var/db/locate.database, which must also exist, in order to be rebuilt. rebuild_mandb This rebuilds the apropos(1) database /var/db/man.db, using makemandb(8) with the -f option. rebuild_whatisdb This rebuilds the whatis(1) database(s). Note that NetBSD provides a default whatis.db for the system manual pages and this may not be needed. (Adjust your /etc/man.conf as necessary; see man.conf(5) for details.) FILES
/etc/weekly weekly maintenance script /etc/weekly.conf weekly maintenance configuration /etc/weekly.local local site additions to /etc/weekly SEE ALSO
daily.conf(5), monthly.conf(5) HISTORY
The /etc/weekly script first appeared in 4.3BSD. The /etc/weekly.conf configuration file appeared in NetBSD 1.3. BSD
March 6, 2012 BSD
All times are GMT -4. The time now is 01:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy