0

Is there a way to pass URL / Query variables when you run: wp cron event run using WP CLI? I have a specific event and ID I want to pass to it but don't know if it is possible or how to pass GET ($_GET) variables to the command line.

  • Can you provide some context as to why you would need GET variables? Is there no particular reason that Job couldn't be done as a separate WP CLI command with CLI parameters? – Tom J Nowell Apr 13 '17 at 12:42
  • I want to run a longer running task that breaks up the number of tasks into smaller chunks that get triggered every few minutes. I want to tell it to trigger that specific trigger command with the ID of the task I want to run. It is done that way to as not to interrupt or block the existing WP Cron. For instance if I run example.com/wp-cron.php?key=xyz&id=32&action=trigger - I want to pass the key, id, and action variables. – Jim Apr 13 '17 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.