5 Replies Latest reply on Apr 27, 2006 8:02 AM by expertnot

    <cfschedule> tag

      I am trying to utilize the <cfschedule> tag to send an email reminder to my users. I've copied the code from my 4th edition coldfusion manual vebatim but nothing happens. The book makes it look simple, but does not go into any detail. My first page is the scheduler.cfm page. It reads like this:

      <cfschedule action="Update"

      The page I wish to activate is the 30d_email_1.cfm page. When I open the 30d_email_1.cfm page in my browser and press reload, it sends the requested email.

      I don't control the server but I am told this feature is not being blocked. How does cfschedule run the task and what am I missing.

      Any advice would be greatly appreciated.

        • 1. Re: &lt;cfschedule&gt; tag
          Do you have Security/Logon logic in the destination page or its application.cfm? Most apps have something, especially given the https. The scheduler is going to actually open that page in a virtual browser with as the IP. If you add the publish= operand (file, path, etc) you should see the resultant HTML and if you have one you should see your Logon page as the final action. If not, at least it can help debug. If it IS logon, one (not very secure) trick people use is a URL parm, https://hrweb/epms/30d_email_1.cfm?anoteasilyguessednologonparm=Y, that application.cfm can look for and use to bypass the logon logic.
          • 2. Re: &lt;cfschedule&gt; tag
            jdeline Level 1
            It's been a while, but I recall that if I tried to set the scheduler to fire off too soon after I ran CFSCHEDULE, it would fail. It seemed that CF needed 20-30 minutes to elapse before the first occurrence ran.
            • 3. Re: &lt;cfschedule&gt; tag
              drforbin1970 Level 1
              Go into the CF Administrator and run your scheduled app from there. Does it succeed? If so, try NOT using military time. I've found it's not reliable unless you use the AM or PM. ex. startTime = "10:02 PM"

              I use the 'PM' and my apps have run over a month now, every night with no problems.

              Some have said to format the dates this way for CFSCHEDULE also:
              startDate = "11-mar-2006"

              I have seen a few messages on here with CFSCHEDULE and CFMAIL posted together, so there may be a problem with those tags being used together. Do a search on here.

              Good luck.
              • 4. Re: &lt;cfschedule&gt; tag
                Level 7
                since you are using https: also try specifying the port (443?). I always
                specify a port...if my memory serves me well...it was because of a
                similar problem.
                Tim Carley
                • 5. Re: &lt;cfschedule&gt; tag
                  expertnot Level 1
                  Thanks for the help. I moved the schedule page and the url page to a folder not protected by login. The other thing was when your schedule page is set up, you actually have to open it in the browser to switch it on.

                  I appreciate the help, as always.