Skip to content

Instantly share code, notes, and snippets.

@bobdenotter
Last active June 20, 2018 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bobdenotter/f063d50970d43c899fd541e5183765a6 to your computer and use it in GitHub Desktop.
Save bobdenotter/f063d50970d43c899fd541e5183765a6 to your computer and use it in GitHub Desktop.
Cron.Hourly

Setup:

  • Set up a Bolt install, with default cententypes and some dummy content.
  • Set one item to be “timed publish”:
UPDATE `bolt_entries` SET `datechanged` = '2018-06-20 20:05:26', `datepublish` = '2018-06-20 20:05:26', `status` = 'timed' WHERE `id` = '1';
  • Verify it’s set to timed:

screen shot 2018-06-20 at 20 14 44

  • Run the cron: php app/nut cron --run=cron.Hourly

screen shot 2018-06-20 at 20 19 15

  • See item being published now:

screen shot 2018-06-20 at 20 19 35

  • Re-set it to timed, by running that same SQL query.
  • Re-run the cron: php app/nut cron --run=cron.Hourly

screen shot 2018-06-20 at 20 21 07

  • Entry will not get published, until one hour passes:

screen shot 2018-06-20 at 20 21 42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment