ted serbinski – a blog about drupal, macs, productivity, health, and bmws

a blog about drupal, macs, productivity, health, and bmws

Scheduler module: rewritten

On the long plane ride home from London today (I was out there building the new MTV.co.uk site that is going live early August 2006, see some pictures), I decided to completely rewrite the scheduler module. I based the rewrite upon an earlier article I wrote about the TWiT.tv site where I was using a simple publishing nodes technique.

I talked with Gerhard Killesreiter who maintains the Drupal CVS repository and he said the scheduler module was mostly abandoned and needed some love. So I stepped up to the plate, took a big swing, and got the module back in working shape. Not only that, but I cleaned up the issue queue too. Not too shabby for 2 hours of sleep and switching back 5 hours from one timezone to another in the same day :-)

6 comments

 
Gerald Schmidhuber (not verified) wrote 2 years 17 weeks ago

Hi Ted,

great work, thanks for your effort!

Bye, Gerald

 
bertboerland (not verified) wrote 2 years 17 weeks ago

This is great news and one of the modules that needed a lot of love and a maintainer as well.

So thank you!

 
Gabor Hojtsy (not verified) wrote 2 years 17 weeks ago

Thanks a lot! We use this heavily on Weblabor.hu (Drupal 4.6), and we intend to upgrade, so an upgraded scheduler is very good news for us.

 
Ben Bicais (not verified) wrote 2 years 14 weeks ago

Hi Ted!!

Your great work and effort kicks major ass!!! Bookmarked!!!

Thanx for it!! Ben

 
Jim Miller (not verified) wrote 2 years 14 weeks ago

I got scheduler from the main drupal site (http://ftp.osuosl.org/pub/drupal/files/projects/scheduler-4.7.0 — I’m assuming this is your version?) and had some problems with nodes not publishing/unpublishing at the right times. (For instance, a node scheduled to publish in ten minutes would be published as soon as cron ran.) Here’s what I had to do to scheduler_cron to get it to behave

(a) I added the timezone of the scheduled event into the queries looking for nodes that are ready to be published/unpublished (lines 168 and 190):

  $nodes = db_query('SELECT * FROM {scheduler} s LEFT JOIN {node} n ON s.nid = n.nid WHERE n.status = 0 AND s.publish_on > 0 AND s.publish_on < %d + s.timezone', time());

(b) line 174 has a typo: it should read:

    if ($node->unpublish_on == 0) {

Does this make sense? It seems to be behaving properly on my installation with these changes.

Just checking / hoping to help, Jim

 
ted wrote 2 years 14 weeks ago

Thanks Jim! I’ve actually just committed both of this fixes, should be good now I hope. I’ve learned that dealing with timezones can really make your headspin, eek!

Add your comment

The content of this field is kept private and will not be shown publicly.
  • You can use Textile markup to format text.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <img> <pre>

More information about formatting options

Subscribe to updates

don't worry, spam free!

Recent comments