Skip to main content

script

Run multiple commands from a script file.

tip

Use the script command to automate complex workflows or batch operations in Magento 2 by writing them in a single file.

Usage

n98-magerun2.phar script [options] [--] [<filename>]

Arguments

ArgumentDescription
filenameScript file

Options

OptionDescription
-d, --define[=DEFINE]Defines a variable (multiple values allowed)
--stop-on-errorStops execution of script on error

More about scripting

For general scripting features, see Scripting with n98-magerun2.