self::TITLE, "description" => << 1, "help" => "spécifier le nombre d'étapes", ], ["-f", "--force-enabled", "value" => true, "help" => "lancer la commande même si les tâches planifiées sont désactivées", ], ["-n", "--no-install-signal-handler", "value" => false, "help" => "ne pas installer le gestionnaire de signaux", ], ]; protected $count = 100; protected bool $forceEnabled = false; protected bool $installSignalHandler = true; function main() { app::check_bgapplication_enabled($this->forceEnabled); if ($this->installSignalHandler) app::install_signal_handler(); $count = intval($this->count); msg::info("Starting train for ".words::q($count, "step#s")); app::action("Running train...", $count); for ($i = 1; $i <= $count; $i++) { msg::print("Tchou-tchou! x $i"); app::step(); sleep(1); } msg::info("Stopping train at ".new DateTime()); } }