[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Phpgroupware-developers] asyncservices - cron
From: |
Sigurd Nes |
Subject: |
Re: [Phpgroupware-developers] asyncservices - cron |
Date: |
Thu, 01 Jul 2004 19:59:23 +0200 |
User-agent: |
Mozilla Thunderbird 0.7.1 (Windows/20040626) |
I use a generalised approach - most of it stolen from calendar - but
they will not show up in the calendar (unless I want to...)
Where ever I need a alarm - I initiate the the alarmobjekt with a
alarm-type. In this way I can have different types of alarms.
Called from /property/inc/class.uis_agreement.inc.php (edit):
$alarm_data=$this->bocommon->initiate_ui_alarm(array(
'acl_location'=>$this->acl2_location,
'alarm_type'=> 's_agreement',
'type' => 'form',
'text' => 'Email notification',
'times' => $times,
'id' => $id,
'data' => $data,
'account_id'=> $account_id
));
the initiate_ui_alarm-method is located to
/property/inc/class.bocommon.inc.php
In this case I am looking for the 's_agreement' - which will have the
first id ‘s_agreement:30:0’ for service agreement 30
The alarm form/view is defined by a XSL-stylesheet - to be inserted
where I want.
/property/templates/default/alarm_form.xsl
/property/templates/default/alarm_view.xsl
in this case the alarm form and view is called from
/property/templates/default/s_agreement.xsl
the alarm management methods is gathered in
/property/inc/class.boalarm.inc.php
to choose which timestamp to set the alarm in relation to - I chose (in
this case the termination date as the alarm date (not the date for the
actual alarm...))
/property/inc/class.bos_agreement.inc.php
function read_event($data)
{
$boalarm= CreateObject($this->currentapp.'.boalarm');
$event = $this->so->read_single($data);
$event['alarm_date']=$event['termination_date'];
$event['alarm'] =
$boalarm->read_alarms($type='s_agreement',$data['s_agreement_id']);
return $event;
}
Sigurd
Brian Johnson wrote:
> Do you insert async items directly or do you create calendar events with
> reminders?
>
> ie .. do your "termination date for service agreements" show up the
calendar
>
> I think we (as a group) need to develop a standardized method for app to
> insert calendar events and maintain some kind of link between them
and the
> original app (for revision, modification, deletion, etc)
>
> Sigurd Nes (address@hidden) wrote:
>
>>I'm using HEAD - with a slightly modified "asyncservices.php". I use the
>>service to set alarms for termination date for service agreements in the
>>app property – but the principle is exactly as for the calendar. I will
>>send you the "asyncservices.php" tomorrow off the list (from the
>>production server).
>>
>>Sigurd
>>
>>Brian Johnson wrote:
>>
>>>It works for you?
>>>
>>>I have never been able to get it to work reliably .. sometimes I get
the email
>>>days after the calendar event
>>>
>>>Please do some testing and report if it will work for something like
email a
>>>notice 60 minutes prior to an appointment
>>>
>>>
>>>
>>>sigurdne (address@hidden) wrote:
>>>
>>>
>>>>Thanks! - that was it.
>>>>
>>>>Sigurd
>>>>
>>>>
>>>>
>>>>>===== Original Message From address@hidden,
>>>>
>>>>address@hidden =====
>>>>
>>>>
>>>>>try /usr/bin/php
>>>>>cron jobs don't usualy get a complete shell and therefore don't have
>>>>>$PATH to look for binaries in.
>>>>>
>>>>>On Wed, 30 Jun 2004 13:07:10 +0200, sigurdne <address@hidden>
wrote:
>>>>>
>>>>>
>>>>>>I have a problem when running asyncservices as cron that force me
to use
>>>>
>>>>the
>>>>
>>>>
>>>>>>fallback method:
>>>>>>The /var/log/cron/info tell me that the job got executed on
schedule – but
>>>>>>nothing happens.
>>>>>>If I run the command manually (either from a terminal – or from
the cron
>>>>>>scheduler in webmin)– everything is ok.
>>>>>>
>>>>>>This also applies to the testjob.
>>>>>>
>>>>>>The command is:
>>>>>>php /var/www/html/phpgroupware/phpgwapi/cron/asyncservices.php
default
>>>>>>
>>>>>>Any clues?
>>>>>>
>>>>>>Sigurd
>>>>>>
>>>>>>_______________________________________________
>>>>>>Phpgroupware-developers mailing list
>>>>>>address@hidden
>>>>>>http://lists.gnu.org/mailman/listinfo/phpgroupware-developers
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>_______________________________________________
>>>>>Phpgroupware-developers mailing list
>>>>>address@hidden
>>>>>http://lists.gnu.org/mailman/listinfo/phpgroupware-developers
>>>>
>>>>
>>>>
>>>>
>>>>_______________________________________________
>>>>Phpgroupware-developers mailing list
>>>>address@hidden
>>>>http://lists.gnu.org/mailman/listinfo/phpgroupware-developers
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>_______________________________________________
>>>Phpgroupware-developers mailing list
>>>address@hidden
>>>http://lists.gnu.org/mailman/listinfo/phpgroupware-developers
>>>
>>>
>>>
>>
>>
>>
>>_______________________________________________
>>Phpgroupware-developers mailing list
>>address@hidden
>>http://lists.gnu.org/mailman/listinfo/phpgroupware-developers
>>
>>
>
>
>
>
> _______________________________________________
> Phpgroupware-developers mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/phpgroupware-developers
>
>
>