Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anders Brohäll 295 posts 561 karma points c-trib
    Dec 21, 2011 @ 15:05
    Anders Brohäll
    0

    Scheduled tasks, return value in log?

    Hi,

    I've got a scheduled task called MailScheduler running on a site - which works good.

    However, in the umbracoLog table the log entry varies in the boolean return value.
    Where does the return value come from? How do i modify it?

    Examples:
    MailScheduler has been called with response: False
    MailScheduler has been called with response: True

     

    Anders

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Dec 21, 2011 @ 15:17
    Tom Fulton
    0

    Hi,

    I think if your page returns a 200 you get true, otherwise false.

    To get more detailed info you could always add a log entry in the code of your MailScheduler page, then you could add any info you like to the log, ex:

    umbraco.BusinessLogic.Log.Add(LogTypes.Debug, 0, "Any comments you like...");

    Also, not sure if you want this but the TaskScheduler package has an option to email you the output of the task's page each time.

    -Tom

  • Anders Brohäll 295 posts 561 karma points c-trib
    Dec 21, 2011 @ 15:20
    Anders Brohäll
    0

    It doesnt seem to be returning (StatusCode == 200).

    How do we figure out so that we are certain?
    Who knows?

     

    Thanks for the package suggestion, i will look into it.

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Dec 21, 2011 @ 15:26
    Tom Fulton
    0

    Actually that does seem to be the case, per the source of publishingService.cs - if your task returns HttpStatusCode.OK (200) you get true in the log.  I think adding your own logging on your page would be the easiest solution.

    -Tom

  • Anders Brohäll 295 posts 561 karma points c-trib
    Dec 21, 2011 @ 18:36
    Anders Brohäll
    0

    Ok.
    Thank you!

Please Sign in or register to post replies

Write your reply to:

Draft