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


Ignore:
Timestamp:
11/18/13 14:12:56 (10 years ago)
Author:
Nick Holden
Comment:

--

Legend:

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

    v1 v2  
    77Richard will document this fully here.
    88
    9 == Note regarding Cron User ==
     9== Note regarding Cron System ==
    1010By 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.
    1111
    12 However, 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.
     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 System' (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 System in order to obtain the correct contact ID.