Greetings,

There is not a direct way in the Scheduler that I could think of,
however the Scheduler can get you close and VBA can do the rest.

Set up your script to run Weekly on Monday at desired time.

 

Paste the code below into  a new Module in your project.

 

Then at the beginning of your script execute the IsSecondMonday function
I have below. If this is a Rules Script, what you'd do is put a Step at
the very beginning of the script with one Rule.

In that Rule add the following to its action:

 

If Not IsSecondMonday Then

    End

End If

'-----------------------------------------------------------------------
--------------------------

Function IsSecondMonday() As Boolean

    If Date = NthDayOfWeek(Year(Now), Month(Now), 2, 2) Then

        IsSecondMonday = True

    Else

        IsSecondMonday = False

    End If

End Function

 

Public Function NthDayOfWeek(Y As Integer, M As Integer, _

    N As Integer, DOW As Integer) As Date

    NthDayOfWeek = DateSerial(Y, M, (8 - Weekday(DateSerial(Y, M, 1), _

     (DOW + 1) Mod 8)) + ((N - 1) * 7))

End Function

'-----------------------------------------------------------------------
-----------------------------

I can't take full credit for the above:

I got the meat of it from here :
http://www.cpearson.com/excel/DateTimeVBA.htm

Regards,

Thom

 

Thom C. Blackwell

Product Manager

Boston Software Systems

(866) 653-5105 ex 807

www.bossoft.com <http://www.bossoft.com/> 

 

Sign up for my weekly webinar!
<http://www.bostonworkstation.com/customer_center/special_events.aspx> 

 

LEGAL NOTICE Unless expressly stated otherwise, this message is
confidential and may be privileged. It is intended for the addressee(s)
only. Access to this E-mail by anyone else is unauthorized. If you are
not an addressee, any disclosure or copying of the contents of this
E-mail or any action taken (or not taken) in reliance on it is
unauthorized and may be unlawful. If you are not an addressee, please
inform the sender immediately, then delete this message and empty from
your trash.

 

From: [email protected] [mailto:[email protected]] 
Sent: Sunday, May 09, 2010 11:37 PM
To: Talk
Subject: RE: [talkbws] Scheduler Question

 

Isn't this the same as dividing by zero?

 

Shirley Hammack

I.T.  Financial Analyst

Duncan Regional Hospital

580-251-8939

 

From: [email protected] [mailto:[email protected]] 
Sent: Monday, May 03, 2010 10:21 AM
To: [email protected]
Subject: [talkbws] Scheduler Question

 

I'm looking for a way to setup a monthly scheduled job to run every 2nd
Monday of the month.  Has anyone successfully done this before?

 

Thanks,


John Taylor
Systems Analyst, Information Systems | Augusta Health
540-332-4882 | www.augustahealth.com <http://www.augustahealth.com/> 
 

 

 

---  To post a message to this list, send mail to: [email protected]
You are currently subscribed as: [email protected]
Unsubscribe in the customer center on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk
.aspx   

 


Please consider the environment before printing this e-mail.

"CONFIDENTIALITY NOTICE: This e-mail and any files transmitted 
with it are the property of DRH and/or its affiliates, 
are confidential, and are intended solely for the use of the 
individual or entity to whom this e-mail is addressed. 
If you are not one of the named recipient(s) or otherwise have 
reason to believe that you have received this message in error, 
please notify 580.251.8773 and delete this message immediately 
from your computer. Any other use, retention, dissemination, 
forwarding, printing, or copying of this e-mail is strictly prohibited."

 

---  To post a message to this list, send mail to: [email protected]
You are currently subscribed as: [email protected]
Unsubscribe in the customer center on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk
.aspx   

---  To post a message to this list, send mail to: [email protected]    You are 
currently subscribed as: [email protected]    Unsubscribe in the 
customer center on our website: 
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx   

<<image001.gif>>

Reply via email to