Skip to main content
Participant
September 9, 2010
Answered

Sending group email on a specific day

  • September 9, 2010
  • 3 replies
  • 781 views

Hi there,

Not exactly a newbe but this is something I have never considered. I have a database with a list of users and each user has an email linked to them. I want to set up the ColdFusion application o that it sends out an email to all the members on a specific date. My question is: What is the best way to do this?

I have considered writing a script that runs each time a page is loaded to check the dates and send the group email if the current date matched the date on which to email. Obviously this will affect the load time of the page every time it is accessed. My next concern is that if I do decide to go ahead with this option the script is only going to check the date if the page is loaded on that day.

Any input would be very appreciated.

Thanks,

Steven

    This topic has been closed for replies.
    Correct answer JayeshViradiya

    I think a CFAdministrator Schedular task would suffice your needs. You can creat a schedulr task and register it in CFAdmin and it would run everyday to check, if today is the day to send out a group mail.

    Jayesh Viradiya

    3 replies

    sbruce13Author
    Participant
    September 9, 2010

    Success!

    So I didn't actually have access to the ColdFusion administrator because my websites on a shared server; however, I did find <CFSCHEDULE> which by the sounds of things does this for you without touching CFAdministrator. Same outcome anyway. Just for clarity, I created a page that scheduled the task

         <CFIF url.outputDate GT NOW()>
            <CFSCHEDULE action = "update"
                task = "TaskName#makeUniqueVar#"
                operation = "HTTPRequest"
                url = "http://www.domain.com/sendGroupEmail.cfm?var1=#var1#&var2=#var2#&var3=#var3#"
                startDate = "#url.outputDate#"
                startTime = "12:00 AM"
                interval = "once">
        </CFIF>

    and sendGroupEmail.cfm sends the email. Easy!

    Regards,

    Steven

    JayeshViradiyaCorrect answer
    Participating Frequently
    September 9, 2010

    I think a CFAdministrator Schedular task would suffice your needs. You can creat a schedulr task and register it in CFAdmin and it would run everyday to check, if today is the day to send out a group mail.

    Jayesh Viradiya

    sbruce13Author
    Participant
    September 9, 2010

    That sounds good. Thanks very much.

    I'll reply with my results when I get round to implementing it.

    Thanks again,

    Steven

    Participant
    September 9, 2010

    Absolutely, this is exactly the sort of information I am looking for actually. I will be following this thread with interest. Thank you.