Cron job -- to execute at every first Sunday of every month

Tags
beginners, cron, cronjob, crontab

 

 
Thread Tools Search this Thread
# 1  
Old 05-03-2007
Cron job -- to execute at every first Sunday of every month

Dear all

How can I schedule the cronjob to be run sometime at every first Sunday at every month? I have the edit the cronjob every month now, thanks
# 2  
Old 05-03-2007
For one thing, you could edit the crontab once a year and put in 12 entries. But here is my script for a better solution....

weekselector extend the capabilities of a crontab

There are several other solutions that get posted from time to time. Use our search function if you want more options.
# 3  
Old 05-04-2007
Maybe change the crontab to run every Sunday and check the day of the month, e.g...
Code:
0 2 * * 7 [ `date '+%e'` -le 7 ] && run_script.sh

 

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Similar Threads More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
cron job on 3rd sunday of every month System Admin 77 AIX 1 10-16-2018 11:11 AM
Run script on every last sunday of the month netdbaind Shell Programming and Scripting 2 07-21-2016 08:46 PM
Trigger the script if it is first sunday of the quarterly month Arun1992 Shell Programming and Scripting 13 12-31-2015 01:45 AM
How to setup cronjob 3rd sunday of every month? netdbaind Shell Programming and Scripting 7 10-30-2014 08:47 AM
How to get first sunday of the month? infyanurag Shell Programming and Scripting 17 05-08-2013 05:08 PM
[Solved] Cron - job to run every 3rd Friday of the month only kaibiganmi UNIX for Dummies Questions & Answers 2 11-09-2012 06:01 AM
Adding a cron job that will execute everyday at 14:50 hrs saurabhkoar Shell Programming and Scripting 2 07-03-2012 07:36 AM
cron job to run on second to last friday each month lupin..the..3rd Shell Programming and Scripting 0 03-30-2012 03:58 PM
Autosys job run on Sunday anupdas UNIX for Advanced & Expert Users 2 04-04-2011 08:52 PM
How to Set up a cronjob On 4th Sunday of every Month? tp2115 UNIX for Dummies Questions & Answers 11 08-25-2010 01:05 PM
Crontab job to run every sunday govindts Shell Programming and Scripting 2 12-15-2008 05:01 PM
a cron job needs a perl script to execute Exader UNIX for Dummies Questions & Answers 2 04-22-2008 04:45 PM
Crontab job on sunday with two week interval tan.pham AIX 4 03-20-2008 04:50 AM
CRON job to execute all scripts in a directory Annorax UNIX for Dummies Questions & Answers 6 06-22-2007 02:05 PM
setting up cron job for month end week report Bhups UNIX for Dummies Questions & Answers 3 04-07-2006 06:42 AM
All times are GMT -4. The time now is 02:39 PM.

Unix & Linux Forums Content Copyright 1993-2018. All Rights Reserved.