BuiltByOtte Cloud is live: managed panel hosting, 30% off year one. Configure yours

Automatic stock

Keep the stock of a product in line with the free memory and disk of its node.

On this page

Automatic stock sets the stock of a product to the number of servers that still fit on its node.

How the stock is calculated

For every product with a Node:

  1. The free memory and disk of the node are read from the panel: the total minus what is allocated to servers.
  2. The free memory is divided by the Memory of the product, and the free disk by its Disk. A value of 0 is left out.
  3. The lowest of the two is the stock.
  4. Minimum Stock Buffer is subtracted from it.

Products without a node, or with both memory and disk on 0, are skipped.

Turn it on

  1. Edit your server under Extensions → Servers.
  2. Turn on Enable Automatic Stock Calculation.
  3. Set Update Interval, between 5 and 1440 minutes.
  4. Set a Node on every product that should get automatic stock.

The update runs through the Paymenter cron job:

* * * * * php /var/www/paymenter/artisan schedule:run >> /dev/null 2>&1

Run it by hand

cd /var/www/paymenter
php artisan advancedcalagopus:update-stock
Argument or option What it does
42 Updates only the product with ID 42
--dry-run Shows the new stock without saving it

Last updated

Still stuck? Open a ticket on the help page or ask in Discord. Mention your version and what you tried.