{"record":{"id":"d91e8c9698b1a155","repo":"phacility/phabricator","slug":"specify-how-long-to-delay-tasks-for-with-until","errorCode":null,"errorMessage":"Specify how long to delay tasks for with \"--until\".","messagePattern":"Specify how long to delay tasks for with \"--until\"\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/infrastructure/daemon/workers/management/PhabricatorWorkerManagementDelayWorkflow.php","lineNumber":41,"sourceCode":"          array(\n            array(\n              'name' => 'until',\n              'param' => 'date',\n              'help' => pht(\n                'Select the date or time to delay the selected tasks until.'),\n            ),\n          ),\n          $this->getTaskSelectionArguments()));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $viewer = $this->getViewer();\n\n    $until = $args->getArg('until');\n    $until = $this->parseTimeArgument($until);\n\n    if ($until === null) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify how long to delay tasks for with \"--until\".'));\n    }\n\n    $tasks = $this->loadTasks($args);\n\n    if (!$tasks) {\n      $this->logWarn(\n        pht('NO TASKS'),\n        pht('No tasks selected to delay.'));\n\n      return 0;\n    }\n\n    $delay_count = 0;\n    foreach ($tasks as $task) {\n      if ($task->isArchived()) {\n        $this->logWarn(","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/workers/management/PhabricatorWorkerManagementDelayWorkflow.php#L23-L59","documentation":"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.","triggerScenarios":"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.","commonSituations":"Operators forgetting the flag; scripts passing an empty $until variable; malformed relative time expressions.","solutions":["Add --until with a value Phabricator can parse, e.g. --until '2 hours' or an absolute timestamp.","Script authors should validate the variable is non-empty before building argv."],"exampleFix":"# before\nbin/worker delay --ids 123\n# after\nbin/worker delay --ids 123 --until '2 hours'","handlingStrategy":"validation","validationCode":"if ($until === null) {\n  // require --until with a parseable value before invoking the workflow\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pair the delay workflow with --until.","Use time expressions Phabricator parses, e.g. --until '2 hours'."],"tags":["phabricator","worker-queue","cli","usage"],"backgroundTag":"missing-cli-argument","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}