2

I have a simple workflow and am trying to figure out a way to get workflow scheduler to make node state changes in real time, at their scheduled time.

  1. I set the state change on a node to occur at 09:00 from draft to live.
  2. If cron runs before 09:00, the state does not change until the next time cron runs.
  3. If the next time cron runs is not until 11:00AM, the state change doesn't occur until 11:00.

This is a problem since editors expect their content to go live when they tell it to go live. This does not seem like difficult functionality, but maybe I missing something basic. I understand that I can run cron more frequently, but it seems crazy that my cron schedule has to match the editor's publishing workflow, as in, "you should always have articles go live at 9am because that's when cron runs". What happens when editors want a node to go live outside of the normal cron schedule? It seems I missing a way for Drupal to "wake up" at this time and run cron to make the node live. Does anyone have a way to do this that I am overlooking? I find it hard to believe that news sites running in Drupal like economist.com or examiner.com don't have this type of real-time scheduling functionality. Thanks in advance.

2

You can use Elysia Cron to let the workflow cron hook run every minute, without sacrifing performance by having other cron hooks run that often.

See Multiple (and differents) crons?

1

I had this issue when I worked with media website, and the only way that you fixed it, is to increase the cron frequency. In my case it was every five minutes, but it means that your node can be live at 9:00 or 9:05 according the cron.

And in case if it wasn't enough, you already thought about other ideas to fixe, it, and one was to use an external service, like Google App Engine TaskQueue or another similar service in your own server.

Or if you want to do it live, you still can let all your node publish (so live) but you restrict the select (with views) with all node who has time equal or lower than actual. But, you gonna have the cache problem in that case also.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.