Re: [Arsperl-users] Problem from web or cron
Brought to you by:
jeffmurphy
|
From: Vaughan, M. <Mar...@ca...> - 2007-10-18 15:50:42
|
Have you verified that you are logging in to ARS as the same user?
As a test, try changing your qual in the cron to directly select one of
those records that shows up interactively.
Mark Vaughan
TTS Development
Comcast Cable Corporation
720.268.8591
-----Original Message-----
From: ars...@ar...
[mailto:ars...@ar...] On Behalf Of Thilo Stapff
Sent: Thursday, October 18, 2007 2:36 AM
To: Brad O'Hara; ARSperl User Discussion
Subject: Re: [Arsperl-users] Problem from web or cron
You might try the following:
Assuming that '800000101' is a date or date/time field, specify the date
in the qualifier string as an integer (epoch time for date/time fields,=20
see recent arsperl-users thread about date conversion for date fields).
Furthermore, it looks like '800006010' might be a selection field. If=20
this is the case, specify the corresponding integer values of "Problem"=20
and "Informational" here as well.
Regards,
Thilo Stapff
Brad O'Hara wrote:
> COMMAND LINE:
> Started at Wed Oct 17 14:35:00 EDT 2007
>=20
> after login errstr=3D><
> q=3D>('800006010' =3D "Problem" OR '800006010' =3D "Informational") =
AND=20
> '800000101' =3D "10/16/2007"<
> after load qual errstr=3D><
> qual=3D>ARQualifierStructPtr=3DSCALAR(0x89ae9b0)<
> after get list errstr=3D><
> number entries=3D>19<
> CNS-00000000061
> CNS-00000000062
> CNS-00000000063
> CNS-00000000064
> CNS-00000000065
> CNS-00000000066
> CNS-00000000067
> CNS-00000000068
> CNS-00000000069
> CNS-00000000070
> CNS-00000000071
> CNS-00000000072
> CNS-00000000073
> CNS-00000000075
> CNS-00000000076
> CNS-00000000077
> CNS-00000000078
> CNS-00000000079
> CNS-00000000080
>=20
> CRON:
> Started at Wed Oct 17 14:43:02 EDT 2007
>=20
> after login errstr=3D><
> q=3D>('800006010' =3D "Problem" OR '800006010' =3D "Informational") =
AND=20
> '800000101' =3D "10/16/2007"<
> after load qual errstr=3D><
> qual=3D>ARQualifierStructPtr=3DSCALAR(0x98d8810)<
> after get list errstr=3D><
> number entries=3D>0<
>=20
> Thanks sooo much for your help! This is driving me crazy. Notice I
get=20
> logged in and the qualifier is built fine, but I get no entries. I=20
> attached the entire script if that helps.
>=20
> Brad
>=20
> Thilo Stapff wrote:
>> Would it be possible to insert some debug statements to see how far
it=20
>> gets (especially checking for $ars_errstr after every ARS API call)?
>>
>> I don't know where the output from cron jobs goes, but there should
be=20
>> a log file for this. Or maybe the output can be explicitly redirected
>> in the cron job definition?
>>
>> Do you know if the script gets started at all?
>>
>>
>> Regards,
>> Thilo Stapff
>>
>>
>> Brad O'Hara wrote:
>>> Sorry to bother you directly, I posted this to the list without a=20
>>> response :-( and noticed you answer most questions.
>>> I am using ARSperl 1.90 against a v7.01 server.
>>>
>>> Not sure what I am doing wrong! I have the following code that=20
>>> retrieves entries when run from the command line, but not from a=20
>>> crontab entry.
>>>
>>> my $c =3D ars_Login(&CCACHE::SERVER, &CCACHE::USERNAME,=20
>>> &CCACHE::PASSWORD);
>>> my $query =3D qq/('800006010' =3D "Problem" OR '800006010' =3D=20
>>> "Informational") AND '800000101' =3D "$date"/;
>>>
>>> ($qual =3D ars_LoadQualifier($c, $schema, $query));
>>>
>>> # Get Requests
>>> my (%entries =3D ars_GetListEntry($c, $schema, $qual, 0, 0)) ;
>>>
>>> if ( %entries ) {
>>> my (%values, %ticket);
>>> foreach $entry_id (sort keys %entries) {
>>> }
>>> }
>>> else { #nothing returned }
>>>
>>> The only thing I could think of was a path difference, however, I
set=20
>>> $ENV{'PATH'} =3D to the same as the shell path.
>>>
>>> Any help is greatly appreciated.
>>>
>>
>>
>=20
------------------------------------------------------------------------
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Arsperl-users mailing list
Ars...@ar...
https://lists.sourceforge.net/lists/listinfo/arsperl-users
|