phacility/phabricator · warning · PhutilArgumentUsageException

Specify how long to delay tasks for with "--until".

Error message

Specify how long to delay tasks for with "--until".

What it means

The worker-management delay workflow postpones selected tasks and needs --until to know the target time; parseTimeArgument() returns null for a missing or unparseable value, and this usage exception is thrown before any task is selected or modified.

Source

Thrown at src/infrastructure/daemon/workers/management/PhabricatorWorkerManagementDelayWorkflow.php:41

          array(
            array(
              'name' => 'until',
              'param' => 'date',
              'help' => pht(
                'Select the date or time to delay the selected tasks until.'),
            ),
          ),
          $this->getTaskSelectionArguments()));
  }

  public function execute(PhutilArgumentParser $args) {
    $viewer = $this->getViewer();

    $until = $args->getArg('until');
    $until = $this->parseTimeArgument($until);

    if ($until === null) {
      throw new PhutilArgumentUsageException(
        pht(
          'Specify how long to delay tasks for with "--until".'));
    }

    $tasks = $this->loadTasks($args);

    if (!$tasks) {
      $this->logWarn(
        pht('NO TASKS'),
        pht('No tasks selected to delay.'));

      return 0;
    }

    $delay_count = 0;
    foreach ($tasks as $task) {
      if ($task->isArchived()) {
        $this->logWarn(

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Add --until with a value Phabricator can parse, e.g. --until '2 hours' or an absolute timestamp.
  2. Script authors should validate the variable is non-empty before building argv.

Example fix

# before
bin/worker delay --ids 123
# after
bin/worker delay --ids 123 --until '2 hours'
Defensive patterns

Strategy: validation

Validate before calling

if ($until === null) {
  // require --until with a parseable value before invoking the workflow
}

Prevention

When it happens

Trigger: Running bin/worker delay --ids <n> (or another selection) without --until, or with a value Phabricator's time parser cannot interpret so it resolves to null.

Common situations: Operators forgetting the flag; scripts passing an empty $until variable; malformed relative time expressions.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/d91e8c9698b1a155. Report an issue: GitHub.