daily_maint.php
is run once per day. It is never called directly;
hourly_maint.php
calls it when it runs during hour 0. This is important,
because hourly_maint.php
holds a semaphore that prevents
the delivery engine from stepping on the shared memory space while the
maintenance code is running.
hourly_maint.php
). For any creatives which
have specific impression targets, it checks the number remaining. If that
number is greater than 0, mail will be sent to the administrator.
The administrator's email is in the OASISPrefs table as "AdminEmail".
Finally, campaigns with no impression targets are scanned. Their creatives are inserted into the DailyTargets table with Target = 0, and
Weight = int(Campaigns.Weight * (Creatives.Weight / Sum of all campaign creatives' weights) * 100)
This multiplication preserves the relative weights of creatives within a campaign and the relative weights of campaigns to each other.
This might be a no-brainer, but it is important to note that as campaigns and creatives are scheduled, only those scheduled to run on today's day of the week will be scheduled. For example, if the script is running on a Monday, only campaigns and creatives slated to run on Mondays will be examined.
hourly_maint.php
is really important. The Creative Content
and Creative Clickthrough shared memory segments are wiped clean (thus,
if the delivery engine were running, it would experience severe trauma).
For each creative in the HourlyTargets table, the Contents, ClickthroughURL,
and other relevant fields (Redirect, MIMEType, Animated) are loaded into
the two shared memory segments.