public function getCommandlineInvocation($method_name, $http_host=null, $http_args=[])
    {
        $command_prefix = "php " . ROOT . "/public/index.php";

        // Match fully-qualified method name: e.g. \Foo\Controllers\Jobs\Bar::baz()
        preg_match('/Controllers.([^:]+)::([A-Za-z_]+)/', $method_name, $matches);
        if (count($matches) !== 3) {
            return '';
        }
        $class_name = strtolower($matches[1]);
        $class_name = preg_replace('/\\\/', '_', $class_name);
        $method_name = strtolower($matches[2]);

        // Build argument for --request opt
        $request_arg = "/$class_name/$method_name";
        if (!empty($http_args)) {
            $request_arg .= "?" . http_build_query($http_args);
        }

        // Build argument for --http_host opt
        if (is_null($http_host)) {
            $http_host = \sb\Gateway::$http_host;
        }

        return "$command_prefix --request=$request_arg --http_host=$http_host";
    }