holiday


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting holiday
# 1  
Old 09-05-2006
holiday

hey all, I have set up a cron job which would be invoked at 1:00 am everyday. However, there is really no need to invoke such job if it's a public holiday so I am wondering if anyone have any idea on how to approach this? Thanks in advance!
# 2  
Old 09-05-2006
Check this: https://www.unix.com/answers-to-frequently-asked-questions/13527-cron-crontab.html
Learn Perderabo's given tutorial, it'll save your much time in future writing cron jobs.

Regards,
Tayyab
# 3  
Old 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.
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. What is on Your Mind?

Holiday Thoughts for the End of 2018

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

2. What is on Your Mind?

Are we having sat-sun holiday for unix forum?

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

3. UNIX for Dummies Questions & Answers

Run scripts through AutoSys depending on holiday

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

4. What is on Your Mind?

Discussing Holiday Season Greetings with jlliagre

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

5. Shell Programming and Scripting

Don't want to invoke job on holiday!

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

6. UNIX Desktop Questions & Answers

Happy Thanksgiving Holiday!

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
Login or Register to Ask a Question