Skip to content

Instantly share code, notes, and snippets.

@Sitebase
Created November 13, 2012 13:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sitebase/4065664 to your computer and use it in GitHub Desktop.
Save Sitebase/4065664 to your computer and use it in GitHub Desktop.
PHP Worker file that restarts after crash
worker: while true; do cd /app/www/ && /app/bin/php worker.php; sleep 1; done
<?php
while (true) {
echo 'Hello world at ' . time() . PHP_EOL;
sleep(1);
}
@victorbstan
Copy link

For heroku to automatically detect this as a PHP project for it's build-pack, you also need a composer.json file, even if it's empty (contains {}).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment