Thank you Baker Kong. I will check the references. I already have SP timer job in place. Its working just fine. I just want to change the source from web service to SP List itself. Let me explain what I am trying to achieve. Currently I have an external Content type SP list called "Employee_Report" which has all employee properties such as EmployeeCode, First Name, Last Name, Manager Name, Location, Department etc. This gets refreshed overnight to ensure all updated employee data(this is the same as web service data incoming into SP).
I have another document library which contains employee folders(its one to one - one employee one folder). Each employee has one folder with his/her name where they store all the employee documents where only employee and his/her manager will have access. Now the SP timer job checks overnight if there are any new employee recorded in SP external list. If identified, it should create a folder for employee in document library and apply permission to self and manager. That's all.
Currently I have a C# web service provides employee data with all properties(such as First Name, Last Name, designation, Manager Name, Location etc.) in the timer job method Execute(Guid targetInstanceId) { }. This is fully functional and working model for over year. All I want is cut off web service and use SP external list itself. May be using (HttpWebRequest)HttpWebRequest.Create("Site URL/_api/web/lists/getByTitle(List Name')/items"); No other functionality change in SP timer job. The reason I am trying httpWebRequest is because the Employee Report external list is in one web application and the document library is in anther web application otherwise I would have used just used simple object model.
Please let me know if you have other suggestions.