How to enable background mode for only specific part of the app?

I want to enable background mode to only a specific part of the program so app does not unnecessarily send consecutive request to server.
So I have two questions.

  1. How to keep awake only a specific page of the entire project.
  2. Run some specific functions in background every few minutes or hours.