I have a script that needs to be execute when a certain node type is published.

Problem is, depending on what the user inputs into the node, this script can take a long time to execute.
So instead of executing it on the spot using Rules, I would like to send it the the queue so it can execute in the background when it gets a chance.

I read that drupal 7 has a queue built into the core, but I can figure out how to send jobs to it.

Comments

TheOldGuy223’s picture

I know you can use

<?php
$queue = DrupalQueue::get('example_queue');
$queue->createQueue();
?>

To create the queue I just dont know how to send an arbitrary script to it.