In my application i need to send periodic web request to server for checking a change in the file that reside in the server. I need to happen all these in background.
Do i need to use Background task to achieve this functionality?
Or simply shall i go with a timer that executes periodically?
Anyone please suggest one better method that suits in this situation.
NB: The implementation is not related to notification. If any update in file means i need to update the same in local file.
A periodic request like this will require a background task because a straight timer in the app won't fire when your app is suspended. The caveat here is that background tasks are limited as to how often they will run; check out How to run a background task on a timer. If you can live within the 15 minute minimum interval, then this is the simplest approach.
An alternate approach would use a raw push notification. A raw notification is one that your app or its background task (again for when the app is suspended) handles directly, and would never issue a toast or tile update unless you did so in response. See How to write a background task for raw push notifications. With this, your server would do the change detection and send the push notification to the apps that care about that file. This has the advantage of being able to handle much more frequent changes, as well as being more efficient when changes are infrequent.
You might possibly also be able to use the content prefetcher for this purpose (see http://blogs.windows.com/buildingapps/2014/05/01/launch-apps-faster-with-prefetched-content/). In this case you'd be making a request for the file itself, and the prefetcher would keep the cached copy up to date. I mention this only for awareness...for your particular scenario it's not quite what you want, but it might be for others reading this answer.