Sitecore schedule task is not running on production

 Hello,

My objective to run task every 24 hrs so what should be the proper configuration for that.

I created a Task in System --> Tasks in Sitecore and set Schedule field value to 20160818|21000101|127|24:00:00

1) What should be the <frequency> element value: <frequency>00:00:05</frequency>

2) What should be interval for DatabaseAgent element: <agent type="Sitecore.Tasks.DatabaseAgent" method="Run" interval="24:00:00" name="Master_Database_Agent" patch:source="Sitecore.Processing.config">

3) What should be interval for Urlagent:<agent type="Sitecore.Tasks.UrlAgent" method="Run" interval="00:15:00"></agent>

4) My website public URL in https://www.mywebsite.com. This website is hosted on two server where redirection is managed by Loadbalancer.

What should be the value of url parameter in Urlagent in this scenario: <param desc="url">127.0.0.1/.../keepalive.aspx</param>.

5) We have CM and CD server. I think if we have to do this task configuration on CM server only then I can use following URL in UrlAgent

<param desc="url">http://cmprodabcd.ef.ghij.kl/sitecore/service/keepalive.aspx</param> Is this correct?

 

Thanks

  • Hi,

    We also had a same issue and we placed below settings into our sitecore.config file on CD server and it start working for us -

    <scheduling>
    <agent name="Web_Database_Agent" type="Sitecore.Tasks.DatabaseAgent" method="Run" interval="00:15:00">
    <param desc="database">web</param>
    <param desc="schedule root">/sitecore/system/tasks/schedules</param>
    <LogActivity>true</LogActivity>
    </agent>
    </schedulng>
  • In reply to Yogeshwer Sharma:

    Actually might be you have logic build up taking consideration CD server but for us we are executing Task on CM server and we have implementation accordingly
    ( in coding we access the web database ).
    So you can ignore point (4).

    Now because these time/interval are somehow related to each other that's why I just want to make sure what should be the value of these time/interval parameters to run Task job properly.
    AND
    does the Sitecore.Tasks.DatabaseAgent interval should be equal to that we set in Schedule field value in Task in Sitecore. I mean
    type="Sitecore.Tasks.DatabaseAgent" interval="24:00:00" =? 20160818|21000101|127|24:00:00

    Please suggest.
  • In reply to Sukhjeevan Singh:

    Hi Sukhjeevan,

    As per my knowledge if Sitecore.Tasks.DatabaseAgent interval and scheduler task time both are different then also it will work there is no need to make them equal. whatever time you want to set on scheduler item will not affect anything, You can go with the default settings comes from Sitecore.
  • Hi Sukhjeevan,

    In Few cases, Sitecron is the ideal solution for triggering scheduled jobs. 

    They are highly recommended if you have performance issues & multi-tenant solution in our sitecore instance 

     https://marketplace.sitecore.net/Modules/S/Sitecron

  • In reply to Yogeshwer Sharma:

    Hi Yogesh,
    Does that meas sitecore pick interval from Sitecore.Tasks.DatabaseAgent interval attribute and rest details( 20160818|21000101|127 ) from Schedule Task field value in Task in Sitecore.
    and I will keep other interval default settings come from sitecore.
  • In reply to Sukhjeevan Singh:

    Hi SukhJeevan,

    No I think actually Sitecore run all the scheduler created under /sitecore/system/Tasks/Schedules/ in given time frequency Sitecore.Tasks.DatabaseAgent time interval. You can define the interval individually on scheduler items also in Sitecore. 20160818|21000101|127 this is the time interval for your task schedule task you can enter time interval also in this string 20160818|21000101|127|00:10:00 now meaning of this string is Sitecore run this task from 18-Aug-2016 to 01-Jan-2100 and 127 means everyday and last 00:10:00 means in every 10 minutes. So this is the complete meaning of this string which basically comes schedule field of scheduler item.

    And I think that interval time should be less then time we are entering for scheduler items in Sitecore.
  • In reply to Balaji Kuppuswamy:

    Thanks Balaji sharing this module..I have a quick look on this and looks like good solution than existing one as it provide full control on scheduling process...I will try to implement in my project
  • In reply to Yogeshwer Sharma:

    Thanks Yogesh now logic is clear...I will try the same
  • In reply to Sukhjeevan Singh:

    Shouldn't the "start|end|days|time", time section NOT be set to 24:00:00? That Sitecore could interpret that as 00:00:00, so instead do 23:59:59

    John West mentioned this once, though a long time ago in another version. 

     

    https://community.sitecore.net/technical_blogs/b/sitecorejohn_blog/posts/repost-all-about-sitecore-scheduling-agents-and-tasks

  • In reply to Filip Jönsson:

    Thanks Filip for this correction...I will change it to 23:59:59
  • The correct format for every 24 hours is: 1.00:00:00, so it would be something like 20160818|21000101|127|1.00:00:00