Thursday, January 7, 2016

Difference between the timer job and windows task scheduler in SharePoint and How to use it?


Timer Jobs

Windows Task Scheduler

<![if !supportLists]>1.     <![endif]>Timer jobs require downtime to deploy.
<![if !supportLists]>2.     <![endif]>Control via Central Admin.
<![if !supportLists]>3.     <![endif]>Schedule of Timer Job will be backed up and restore in your normal process of SharePoint backup and restore.
<![if !supportLists]>4.     <![endif]>Can be deployed using standard WSP solution.
<![if !supportLists]>5.     <![endif]>Custom Timer Jobs provides the power to specify Job LockTypes (i.e. SPJobLockTypes) which guarantees that multiple instances of same job will never execute at the same point in time.

<![if !supportLists]>1.     <![endif]>Windows Scheduled task doesn't require downtime to install/update.
<![if !supportLists]>2.     <![endif]>The task will only run on the server that you've installed it on.
<![if !supportLists]>3.     <![endif]>Administrator needs to manually manage backup and restore of Schedule Tasks
<![if !supportLists]>4.     <![endif]>No standard built in deployment method
<![if !supportLists]>5.     <![endif]>No multiple instance guarantee. Administrator needs to make sure that no two instances are running at the same time.




 Single point of failure : Windows Task Scheduler need to be configured on all the web servers. If you configure to run the job on 1 server only, and this server crashes, job will not work at all.
Status Reporting : Windows Task Scheduler doesn't have any reporting on when was the last time job got executed and what was the status. Only option is logging. Whereas SharePoint have a UI to show status of all the jobs and their status.
Security : In case of Windows Task Scheduler, you will need go to IT Admins and request for a special username/password to run such jobs where as SharePoint Timer Jobs automatically run under SharePoint Timer Job account.
Deployment : There is no easy way to deploy Windows Task Scheduler tasks and application which need to executed in a FARM environment. This will require lot of manual steps by IT Admin. SharePoint jobs can be deployed using WSP's.










No comments:

Post a Comment