Ranjit choudhary
Ranjit choudhary

Reputation: 253

Sitecore Scheduled Job: Unable to run

I am very new with Sitecore, I am trying to create one task, but after creating task I configured command and task at content editor. Still I don't see run now option for my task at content editor. Need help.I want to know where the logs of scheduled jobs are written?

Upvotes: 0

Views: 1397

Answers (2)

Hishaam Namooya
Hishaam Namooya

Reputation: 1081

As specified in the other answers, you can use config file or database to execute your task. However, it seems that you want to run it manually.

I have a custom module on the Sitecore Marketplace which allows you to select the task you want run. Here is the link

In brief, you need to go to the Sitecore control panel, then click on administration and lastly click on the Run Agent.

It will open a window where you can select the task. I am assuming that the task you have implemented does not take the Item details on which you are when triggering the job.

Upvotes: 0

Vladimir
Vladimir

Reputation: 314

There are 2 places where you can define custom task.

  1. In database
  2. In config file

If you decide to go with 1st option

  • a task item must be created under /sitecore/system/tasks/schedules item in the “core” database (default behavior).
  • no matter what schedule you set on that item, it may never be executed, if you do not have right DatabaseAgent looking after that task item.
  • DatabaseAgent periodically checks task items and if tasks must be executed (based on the value set in the Scheduling field), it executes actual code
  • By default the DatabaseAgent is called each 10 minutes

If you decide to go with 2nd option, check this article first.

In short, you need to define your task class and start method in the config files (check out the /sitecore/admin/showconfig.aspx page, to make sure config changes are applied successfully)

<scheduling>
<!--
 Time between checking for scheduled tasks waiting to execute 
-->
<frequency>00:00:05</frequency>    
<agent type="NameSpace.TaskClass" method="MethodName" interval="00:10:00"/>
</agent>   
</scheduling>

Upvotes: 2

Related Questions