{"record":{"id":"b39c8c2d4f53a8d5","repo":"phacility/phabricator","slug":"no-trigger-exists-with-id-s","errorCode":null,"errorMessage":"No trigger exists with id \"%s\"!","messagePattern":"No trigger exists with id \"(.+?)\"!","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/infrastructure/daemon/workers/management/PhabricatorWorkerTriggerManagementWorkflow.php","lineNumber":33,"sourceCode":"  }\n\n  protected function loadTriggers(PhutilArgumentParser $args) {\n    $ids = $args->getArg('id');\n    if (!$ids) {\n      throw new PhutilArgumentUsageException(\n        pht('Use %s to select triggers by ID.', '--id'));\n    }\n\n    $triggers = id(new PhabricatorWorkerTriggerQuery())\n      ->setViewer($this->getViewer())\n      ->withIDs($ids)\n      ->needEvents(true)\n      ->execute();\n    $triggers = mpull($triggers, null, 'getID');\n\n    foreach ($ids as $id) {\n      if (empty($triggers[$id])) {\n        throw new PhutilArgumentUsageException(\n          pht('No trigger exists with id \"%s\"!', $id));\n      }\n    }\n\n    return $triggers;\n  }\n\n  protected function describeTrigger(PhabricatorWorkerTrigger $trigger) {\n    return pht('Trigger %d', $trigger->getID());\n  }\n\n}\n","sourceCodeStart":15,"sourceCodeEnd":46,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/daemon/workers/management/PhabricatorWorkerTriggerManagementWorkflow.php#L15-L46","documentation":"Thrown by trigger management workflows when a requested `--id` does not correspond to an existing PhabricatorWorkerTrigger row. The workflow executes PhabricatorWorkerTriggerQuery with `needEvents(true)` and maps results by ID; every requested ID must appear or the command aborts. Triggers are calendar/subscription scheduling records, and deleted or never-existing IDs fail here.","triggerScenarios":"`./bin/worker trigger execute --id 999` where no trigger 999 exists; an ID recycled from a previous install; a trigger deleted by its owning object (e.g. a subscription) between observation and invocation.","commonSituations":"Stale IDs copied from old output or documentation; scripts replaying recorded trigger IDs against a refreshed database; typo'd IDs.","solutions":["List valid trigger IDs from the `worker_trigger` table and re-run with an existing ID","If the trigger was deleted, regenerate it via the owning feature (e.g. re-save the subscription/calendar) instead of forcing execution"],"exampleFix":"# before\n./bin/worker trigger execute --id 999\n\n# after\n./bin/worker trigger execute --id 7   # 7 confirmed in worker_trigger table","handlingStrategy":"validation","validationCode":"// Verify trigger rows exist before acting\n$rows = queryfx_all(\n  $conn,\n  'SELECT id FROM %T WHERE id IN (%Ld)',\n  'worker_trigger',\n  $trigger_ids);\n$existing = mpull($rows, null, 'id');\n$missing = array_diff($trigger_ids, array_keys($existing));\nif ($missing) {\n  // skip or report missing triggers instead of failing the whole command\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Re-verify trigger IDs from worker_trigger right before execution in scripts","Filter out IDs that no longer exist instead of passing them through and aborting the batch"],"tags":["phabricator","cli","worker-trigger","not-found"],"backgroundTag":"record-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}