What I have done in a similar situation (I have shared cpanel hosting and no way to install supervisor) I used the cron to run laravel's scheduler every minute and inside I used this:
$schedule->command('queue:work --daemon')->everyMinute()->withoutOverlapping();
So whats happening is, the first time it runs, it will start the queue worker in daemon mode, then on every minute it will basically use the withoutOverlapping to only run it again if the previous one crashed/exited/no longer running. This essentially produces a supervisor like functionality. At worst case it will take a minute before the queue worker comes back up in case of a failure / memory limit hit, but in most cases the first thread will stay alive and work through the queue. This is a better way to accomplish queue:listen like functionality without supervisor.
The caveat is of course, you need to run queue:restart whenever you deploy new code so that the daemon worker will restart and get fresh app code.
Hope this helps.
<?php
$host = '127.0.0.1';
$db = 'test';
$user = 'test';
$pass = 'qwerty';
$charset = 'utf8mb4';
$dns = "mysql:host={$host};dbname={$db};charset={$charset}";
$opt = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => false
];
$pdo = new PDO($dns, $user, $pass, $opt);
Design patterns are advanced object-oriented solutions to commonly occurring software problems. Patterns are about reusable designs and interactions of objects. Each pattern has a name and becomes part of a vocabulary when discussing complex design solutions.
The 23 Gang of Four (GoF) patterns are generally considered the foundation for all other patterns. They are categorized in three groups: Creational, Structural, and Behavioral (see below for a complete list).
In this tutorial we provide JavaScript examples for each of the GoF patterns. Mostly, they follow the structure and intent of the original pattern designs. These examples demonstrate the principles behind each pattern, but are not optimized for JavaScript.
grub rescue > ls
(hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos1)
grub rescue > ls (hd0,msdos1) # try to recognize which partition is this
grub rescue > ls (hd0,msdos2) # let's assume this is the linux partition
grub rescue > set root=(hd0,msdos2)
grub rescue > set prefix=(hd0,msdos2)/boot/grub # or wherever grub is installed
grub rescue > insmod normal # if this produced an error, reset root and prefix to something else ..
grub rescue > normal
For a permanent fix run the following after you successfully boot:
sudo update-grub
sudo grub-install /dev/sdX
... where /dev/sdX is your boot drive.
rsync is fast and easy:
rsync -av --progress sourcefolder /destinationfolder --exclude thefoldertoexclude
You can use --exclude multiples times.
Also you can add -n for dry run to see what will be copied before performing real operation, and if everything is ok, remove -n from command line.