Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "> /dev/null 2>/dev/null &"
- " &> /dev/null &"
- <?php
- `echo "the command"|at now`;
- ?>
- $cmd = 'nohup nice -n 10 /usr/bin/php -c /path/to/php.ini -f /path/to/php/file.php action=generate var1_id=23 var2_id=35 gen_id=535 > /path/to/log/file.log & echo $!';
- $pid = shell_exec($cmd);
- mycommand -someparam somevalue &
- start mycommand -someparam somevalue
- $pid=pcntl_fork();
- if($pid==0)
- {
- posix_setsid();
- pcntl_exec($cmd,$args,$_ENV);
- // child becomes the standalone detached process
- }
- // parent's stuff
- exit();
- #!/bin/sh
- mkfifo trigger
- while true; do
- read < trigger
- long_running_task
- done
- /**
- * Asynchronously execute/include a PHP file. Does not record the output of the file anywhere.
- * Relies on the PHP_PATH config constant.
- *
- * @param string $filename file to execute
- * @param string $options (optional) arguments to pass to file via the command line
- */
- function asyncInclude($filename, $options = '') {
- exec(PHP_PATH . " -f {$filename} {$options} >> /dev/null &");
- }
Add Comment
Please, Sign In to add comment