
July 13th, 2003, 04:19 PM
|
|
Registered User
|
|
Join Date: Jul 2003
Posts: 24
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Scheduled task exclusion
Greetings members,
I am new to the forum and have searched briefly but couldn't find exactly what i was after, so forgive me if this has been asked before.
My question is a simple one , I hope. I have a scheduled task that sends an email on the every hour within 9 am til 5 pm. However, I wish to exclude both Saturday and Sunday from this task. So far, this is what I have, but it is not working. I've used DayofWeek, but I also tried with DayOfWeekAsString, alas, with the same results.
-------------------------------------
<cfset TodaysDate = Now()>
<CFIF DayOfWeek(TodaysDate) NEQ 6 OR DayOfWeek(TodaysDate) NEQ 7>
<cfmail from="server@esi.co.nz"
to="markh@cwc.co.nz;"
subject="CWC STAFF BREAK">
Wake up!
</cfmail>
<cfelse>
<cfabort>
</CFIF>
----------------------------------------
Any ideas? All help appreciated.
Mark
|