Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,155 of 9,155 pages
About the help in other languages
All help pages

exp:exphostrun

Run a console command (or, with --shell, a command line) in this installation on one host of settings/cluster.ini, over ssh.

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/examples/commands/exphostrun.md

On this page

exp:exphostrun

Run a console command (or, with --shell, a command line) in this installation on one host of settings/cluster.ini, over ssh.

Script bin/php/exphostrun.php, code in kernel/private/classes/commands/exphostrun.php. Run it from the installation root, as the user the web server runs as:

./console exp:exphostrun --help
./console exp:host:run --help
php bin/php/exphostrun.php --help

Help text

Run a command in this installation on one host, over ssh
The host is one of settings/cluster.ini [ClusterSettings] HostList[]. The words after --
are a console command run there as bin/php/console <words>, in the installation's root
on that host, with its PHP binary, as its User= (sudo -n), else as the ssh login.
--shell runs the words as a command line for sh instead. ssh runs with BatchMode=yes:
a host that would ask for a password fails. Nothing is interactive.

./console exp:host:run web -- exp:cache status
./console exp:host:run web -- exp:ezcache --clear-tag=template
./console exp:host:run web --shell -- git log -1 --oneline
./console exp:host:run web --dry-run -- exp:velocity deploy

Exit code: 0 PASS; 1 the command failed on the host (or ssh did); 2 wrong options or settings.

Generated by ./console exp:help:examples from bin/php/exphostrun.php, kernel/private/classes/commands/exphostrun.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x