Created
March 30, 2011 08:56
-
-
Save joseph-montanez/894085 to your computer and use it in GitHub Desktop.
Sample of running a starting tasklet, waiting for it to finish and start another
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'app.php'; | |
$id = \App\Task\add($title = 'DVD XML Info', $cmd = 'lsdvd -Ox'); | |
while (!\App\Task\isCompleted($id)) { | |
sleep(1); | |
} | |
$task = \App\Task\get($id); | |
$xml = new SimpleXMLElement($task->output); | |
$cmd = sprintf( | |
'mplayer dvd://%s -v -dumpstream -dumpfile %s.vob', | |
$xml->longest_track, | |
$xml->title | |
); | |
\App\Task\add('Rip DVD!!!!', $cmd); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment