Scheduled Tasks

Discussion in 'Suggestions and Feedback' started by lewiska, May 15, 2014.

  1. Will we be getting scheduled task functionality like on DASP?
     
  2. Takeshi

    Takeshi Everleap staff

    Yes, scheduled task is coming. It is in our backlog and one of the higher priorities. It's not in the current sprint but it'll make it into a future sprint soon.
     
    mjp likes this.
  3. Thanks. Are custom 404 and 500 pages coming too?
     
  4. Takeshi

    Takeshi Everleap staff

    You can enable/disable ASP.NET custom errors in the control panel: Sites | settings | configuration
     
  5. Enable and Disable are available via the Control Panel as Takeshi mentioned. However, complete configuration would still require you to update your web.config. Thus, I would recommend that you just forgo control panel.

    You can google around for a solution that meets your exact needs, but in a nutshell add something like this to your web.config:

    <customErrors mode="On" defaultRedirect="MyFriendlyErrorPage.aspx">
    <error statusCode="404"redirect="MyNotFoundPage.aspx"/>
    </customErrors>

    Something like this would direct 404's to the MyNotFoundPage and everything else to the MyFriendlyErrorPageForErrors page.
     
  6. I could not get the customErrors to work as described here, I had to use

    <system.webServer>
    <httpErrors errorMode="Custom" >
    <clear/>
    <error statusCode="404" path="error404.htm" />
    </httpErrors>

    I tried both with custom errors enabled and disabled in the control panel. Ended up disabling them and going with the httpErrors solution.
     
    Ray Huang likes this.
  7. Ray Huang

    Ray Huang Everleap staff

    It's because <system.Web> was old markup for IIS6 and <system.webServer> applies to IIS7 on. See this link.
     
    mjp likes this.
  8. Hey guys –
    I discovered the Scheduled Tasks hidden in the cp just recently on Everleap.

    Long story short, my plan was to use the SQL Job Agent, though just when I was about to invoke it on the live site – I discovered that it would co$t us our monthy latte allotment for the upgrade. Not wanting to do without my java, I went round and round, and finally rolled my own alarmclock class which sort of works; like all potential perpetual motion machines it runs but stops, and I am wondering if that has to do with the statement below… or with the application falling asleep.
    Reference: https://blog.everleap.com/new-features-available-right-now/

    <quote>
    Scheduled Tasks
    Since we do not allow customers to run a scheduled batch for security reasons, we’ve added a new tool which is equivalent to scheduling a batch file.
    The scheduled task tool allows you to schedule an http call made to any URL within your website. This is useful if you want to issue any type of batch processing (daily tally, report, etc.).
    * A scheduled task will not follow HTTP redirect.
    * The tool will wait 20 seconds for a response from the page. If no response is sent from the page no response code will be recorded.
    </quote>

    I can totally work with a timely poking of my token URL(s) to process our site maintenance & subscriber notifications. However, I have exactly the same concerns with keeping the site alive. So I ask the dumb question: Does the “scheduled task” operate outside my application, and thus is not affected if it (the app) should go to sleep, or if the application pool recycled?

    Thank you my friends in the Cloud!
     
  9. mjp

    mjp

    Yes, it's outside of your application pool, so it isn't affected by the state of your application.
     
  10. Awesome! I've been toying with one Scheduled Task assigned to tickler a webform to keep the heat beating. Observations:
    • On the targeted webform, no server-side code appears executed. I have the code-behind instrumented, though nothing appears to run; There are 3 tests: Logging to file with context, kicking the global alarms to see if they're due, and logging to the dB. Results: Nada; not firing. Other than keeping the app alive - I ponder about any other value :(
    • On the heartbeat side, tickling appears to work and the app isn't falling asleep; I have that instrumented as well: Pulse looks good; patient is awake and responding. (I think it's happy).
    Frankly, I would be keen to learn how other folks are using the Scheduled Tasks feature. Surely there must be more opportunity than just hitting a page just to keep us alive.

    Regardless, Thanks guys; fingers-crossed this is the fix: As long as I have a pulse, we can keep on truckin' :cool:
    THANK YOU!
     
  11. Martin Ortega

    Martin Ortega Everleap staff

    Hi Alan,

    Our Scheduled task all it does is make a HTTP GET call to a page. That page must return a 200 response. Our schedule task can not follow any 301 or 302 redirects.

    This means you must create what ever it is you wish to do programmatically in a page. When the page is called on via HTTP request it fires your code.

    I good example would be our sample code on how to send mail here: https://support.everleap.com/kb/a13...an-asp_net-page-with-smtp-authentication.aspx Just hitting the code on the page sends the email message.
     

Share This Page