09-12-2006
Hi, If your cron job is a script (or not you could make it one) then
simply create a file say /usr/local/etc/public.holidays
and list the public holidays in an easy format say dd/mm/yyy.
when cron starts the script, the first thing the script does is check to see if today (the day we are running the cron job) matches any of the days listed in you public.holidays file. If it does. then you stop processing otherwise you continue processing and run your job.
6 More Discussions You Might Find Interesting
1. UNIX Desktop Questions & Answers
Happy Thanksgiving holiday, everyone! Let's leave the computer alone, forget the Unix/Linux for a while, and enjoy your turkey and Foot~~~~~~~~~~~~~~~~~~~~~~ball~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (1 Reply)
Discussion started by: HOUSCOUS
1 Replies
2. Shell Programming and Scripting
Hey all,
I have a question about cron job, I want to invoke a program to perform some operations
on database, however, this operation should only be invoked working day (weekday + not holiday)
. Scheduling a job on weekday is easy but how about holiday?
Thanks in advance! (1 Reply)
Discussion started by: mpang_
1 Replies
3. What is on Your Mind?
Hmm, didn't you press that "Submit new thread" button too early ? ;)
Reference this post:
https://www.unix.com/whats-your-mind/124692-seasons-greetings-happy-holidays-unix-linux-forums.html (15 Replies)
Discussion started by: jlliagre
15 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
I am new to autosys. Can anyone help me in writing autosys job for the below script?
Requirement is : 1.Every day it should run this script at particular time except on holidays.
2.The day after holiday some other script should be running.
Thanks in advance.
#!/bin/ksh
#set... (0 Replies)
Discussion started by: raghuramyenni
0 Replies
5. What is on Your Mind?
Are we having sat-sun holiday for unix forum?
I am just thinking there are no new things to explore on sat-sun. It looks like holiday for this site also....:D (1 Reply)
Discussion started by: pamu
1 Replies
6. What is on Your Mind?
Happy Holidays.
Here are my randoms thought at the end of 2018 in no particular order.
You Are Truly Blessed
IT people are lucky. We get to use our brains extensively to solve complex and challenging computer-technology related problems. This is very good for our brains. Programming,... (2 Replies)
Discussion started by: Neo
2 Replies
LEARN ABOUT MINIX
holidays
holidays(4) File Formats holidays(4)
NAME
holidays - prime/nonprime table for the accounting system
SYNOPSIS
/etc/acct/holidays
DESCRIPTION
The /etc/acct/holidays file describes which hours are considered prime time and which days are holidays. Holidays and weekends are con-
sidered non-prime time hours. /etc/acct/holidays is used by the accounting system.
All lines beginning with an "*" are comments.
The /etc/acct/holidays file consists of two sections. The first non-comment line defines the current year and the start time of prime and
non-prime time hours, in the form:
current_year prime_start non_prime_start
The remaining non-comment lines define the holidays in the form:
month/day company_holiday
Of these two fields, only the month/day is actually used by the accounting system programs.
The /etc/acct/holidays file must be updated each year.
EXAMPLES
Example 1: Example of the /etc/acct/holidays file.
The following is an example of the /etc/acct/holidays file:
* Prime/Nonprime Table for the accounting system
*
* Curr Prime Non-Prime
* Year Start Start
*
1991 0830 1800
*
* only the first column (month/day) is significant.
*
* month/day Company Holiday
*
1/1 New Years Day
5/30 Memorial Day
7/4 Indep. Day
9/5 Labor Day
11/24 Thanksgiving Day
11/25 day after Thanksgiving
12/25 Christmas
12/26 day after Christmas
SEE ALSO
acct(1M)
SunOS 5.10 28 Mar 1991 holidays(4)