InfoCaptor

  1. Home
  2. Docs
  3. InfoCaptor
  4. Google Analytics – Datawarehouse
  5. Schedule Background Worker

Schedule Background Worker

To automate the extraction of data from Social and Web services like Google Analytics, InfoCaptor comes with a daemon worker that you can schedule to run either once a day or multiple times throughout the day. 

The ideal scenario is to run just once a day and if there is any need to you can kick off the daemon manually from the Launch pad. 

How to run the Background worker manually 

1. Login to infocaptor2. 

Click on the “Process My Jobs” 

By clicking the link “Process My Jobs” it will kick off the background daemon. The daemon will run only those jobs that are due to run. So if the daemon does not show any pending jobs then either all jobs will be picked up tomorrow or whenever they are due. Another reason a job is not picked up could be that it had an error in the previous run. 

How to run the Background worker automatically (Windows) 

Let say you have two websites that you are extracting data from Google Analytics. You have defined two jobs, one for each website that extracts the metrics by date dimension. You want to automate the daily extraction so the daemon is executed everyday at the same time. 

In windows 7, please follow these steps

1. Launch control panel

2. Find Schedule Tasks by typing ‘sch’ in the search box

3. Click on the “Schedule Tasks”

4. The daemon “infocaptor_daemon.bat” is located in the htdocs/infocaptor/dash directory

5. In the schedule Tasks define a new task and point to the “infocaptor_daemon.bat” file For e.g The following screenshots shows the daemon is scheduled to run everyday at 11 AM

How to run the Background worker automatically (Linux) For linux we make use of the cron job to schedule the execution of the daemon.In Ubuntu1.

Goto /etc/cron.d2.

Create a new file named infocaptor_daemon by typing

vi infocaptor_daemon” at the prompt

3. Based on where you have installed infocaptor your complete directory may be different than below.

We need to provide the path to the etl_social_bulk.php file Here is the text you can copy

0 9 * * * www-data cd  /srv/www/myserver/public/infocaptor/dash && php etl_social_bulk.php  >/dev/null 

4. Save the file 

The cron will start executing your infocaptor_daemon at 9 AM everyday.  

Was this article helpful to you? Yes No

How can we help?