Skip to content

Instantly share code, notes, and snippets.

@JesseObrien
Created December 4, 2012 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JesseObrien/4206961 to your computer and use it in GitHub Desktop.
Save JesseObrien/4206961 to your computer and use it in GitHub Desktop.
Artisan task to run a job in Resque with Laravel
<?php
class ExampleTask_Task
{
public function run()
{
// You can pass arguments into the worker as payload
$args = array('name' => 'John Smith');
Resque::enqueue('MyAppName', 'ExampleWorker', $args);
echo "Resque job queued.\n";
return;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment