I have created a "works for me" patch that takes advantage of hook_cron() to automatically demote events from the front page once they're in the past. The patch includes an option in the module admin page to enable or disable the cron hook. Some possible issues:

  • I have a date/time check intended to allow some leeway in letting events stay on the front page once they're past. This check may not be compatible with some cron schedules, and the hook would never run. Maybe this should be parameterized?
  • If it's possible to reduce the two queries into one, I'd like to know how. db_num_rows() does not seem to work with update queries.

Comments

HorsePunchKid’s picture

Version: 4.7.x-1.x-dev » 5.x-2.x-dev
StatusFileSize
new2.05 KB

Updated patch works with Drupal 5.1 and the HEAD version of this module as of 2007-02-4.

killes@www.drop.org’s picture

Status: Needs review » Closed (won't fix)

Sorry, but that's IMO what scheduler.module is for.

HorsePunchKid’s picture

Perfect, thanks for the tip! Patch cheerfully withdrawn.