Changes between Initial Version and Version 1 of Drupal HowTo Write Cron Tasks for CiviCRM


Ignore:
Timestamp:
11/18/13 14:07:26 (11 years ago)
Author:
Nick Holden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Drupal HowTo Write Cron Tasks for CiviCRM

    v1 v1  
     1= Drupal 'cron' and CiviCRM tasks =
     2
     3Certain things in CiviCRM need to happen on an automated basis. The most straightforward way of acheiving this is via drupal's fake cron process, which is well documented on the drupal site. Our drupal cron configuration is set to run hourly, and is triggered when the timer exceeds that limit AND a page somewhere on the drupal site is accessed.
     4
     5== GENVASC 'mark as available' activity ==
     6
     7Richard will document this fully here.
     8
     9== Note regarding Cron User ==
     10By default, the activities and entries created by automated jobs in this way are assigned to whichever user triggered the cron job, in a similar way to the user who accesses an API call in a module being assigned to the results of that API call.
     11
     12However, for an automated process this isn't what we want, because cron jobs will be assigned to whichever user happens to be logged in at the time the job is triggered. Instead, the LCBRU module creates a CiviCRM contact called 'Cron User' (LCBRU Staff sub-type), and all the functions and activities performed by cron tasks should be explicitly assigned to that specific contact ID. This will require the cron job to look up the Cron User in order to obtain the correct contact ID.