[ic] ic jobs and scratch value issue?

Aaron Hazelton aaronmail at hazenet.net
Mon Dec 22 19:31:28 EST 2003


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="blahblah"
[scratch email_body]
[/email]
[else]
nothing for today
[/else]
[/if]

TIA!

-- 
Aaron Hazelton
Hazenet.net


More information about the interchange-users mailing list