ted serbinski – entrepreneur & web architect
  • thoughts
  • about
  • contact



Popular content

  • My Apt is Haunted!
  • SimpleFeed
  • It's back!
  • iCal Calendar on Mac Desktop
  • Taking Naps with Pzizz
  • Sudo on the Mac...
  • The US Government on Open Source
  • Top Tier Gasoline
  • I have left Lullabot...
  • 2 Guys Uncorked launches!
more

Recent comments

  • Unfortunately this method
    2 weeks 1 day ago
  • I’m using this method to sort
    7 weeks 9 min ago
  • I was interested in reading
    8 weeks 5 days ago
  • Ah yes this code is a bit out
    12 weeks 2 days ago
  • After using the original code
    12 weeks 2 days ago
more

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 :-)

posted 22 Jul 2006
  • drupal
  • london

6 comments

#1
Gerald Schmidhuber wrote 4 years 6 weeks ago

Hi Ted,

great work, thanks for your effort!

Bye, Gerald

#2
bertboerland wrote 4 years 6 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!

#3
Gabor Hojtsy wrote 4 years 5 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.

#4
Ben Bicais wrote 4 years 3 weeks ago

Hi Ted!!

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

Thanx for it!! Ben

#5
Jim Miller wrote 4 years 3 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):

  1.   $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:

  1.     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

#6
ted wrote 4 years 3 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.
  • 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>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

More information about formatting options


Code examples and downloadable zip files of code are licensed under a Creative Commons License.
All other content, unless where noted, ©2010 Theodore Serbinski. All Rights Reserved.