[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] ic jobs and scratch value issue? - more info - some things that jobs will not handle?


On Mon, 22 Dec 2003 19:31:28 -0500, Aaron Hazelton <suppressed> wrote:

Hi all,

IC 4.9.8

I have driven myself crazy with this one, and am at a loss. I have
an IC cron job set up, and the [scratch email_body] value is either
not being set or displayed in this context.  code below for further
details. the exact same code produces the expected result when using
the 'test ITL snippet' page... and there are no errors.  I must be
missing something about how this type of value and the 'jobs' work
together or something.

[tmp email_body][query
	   sql="SELECT code,user,start_date,end_date,type,host_domain
			FROM subscriptions
			WHERE ((( CURRENT_DATE() + 0 ) < end_date )
						OR end_date = 'never' )
			ORDER BY end_date DESC;"
		type=list
		list_prefix=subscription
		prefix=sub]
[subscription]

[tmp last_billed][query sql="SELECT capture_date
							FROM transactions
							WHERE store_id = '[sub-param code]'
							ORDER BY capture_date DESC
							LIMIT 1;"
		type=list
		list_prefix=alreadybilled
prefix=alr][alreadybilled][alr-param capture_date][/alreadybilled][/query][/tmp]

[billing-check	start_date="[sub-param start_date]"
				last_billed="[scratch last_billed]"
				type="[sub-param type]"]
				
				[if scratch bill_it]				
				<tr>
					<td class="arialsmall">
					[sub-param code]
					</td>
					<td class="arialsmall">
					[sub-param host_domain]
					</td>
					<td class="arialsmall">
					<a href="[area href='admin/rebill'
									form='num=[sub-param code]'
					]">[if scratch last]last bill: [/if][scratch next_bill]</a>
					</td>
					[if scratch overdue]
						<td class="arialbold">
						OVERDUE
					[else]
						<td class="arialsmall">
						ok
					[/else]
					[/if]
					</td>
				</tr>
				[/if]

[/subscription]
[/query][/tmp]

[if scratch email_body]
[email	to="suppressed"
		from="suppressed"
		subject="billing to-do list for [scratch today]"
		extra="Content-Type: TEXT/HTML; CHARSET=US-ASCII"
		hide=1]
[scratch email_body]
[/email]
[else]
nothing for today
[/else]
[/if]

TIA!


I have now also taken this block of code, which is tested and
works as expected, and instead of enclosing it into a [tmp] value
i have logged it to a text file, creating a new file at the
beginning so that it is blank, then appending each subsequent entry
to it if it exists, and then [include]'ing that file into the email
that gets sent out.

Again, this method also works as a test on the ITL page, and yet
will not log anything to the file (although it is created) from
the job.

there must be something here that is breaking this.  are there certain
things that will not work from a job that have not been noted yet?
of course, i am setting a couple of scratch values for a date and
such in this job as well, and they display, but my main block (perhaps
its when we get into the queries?) will not.

if anyone wants to see it, i will post the code with the logging
method, although it is almost identical.

dumbfounded.

--
Aaron Hazelton
Hazenet.net
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.