Scheduled Trigger

Developer

Caddis

3rd Party (Free)

49 downloads (last 90 days)

BSD 3-Clause License Download v1.1.4

EE Version Support

  • ExpressionEngine 2

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Extension, Module

Tags

Trigger entry submission hooks when scheduled ExpressionEngine entries go live or expire.

Overview

Problem: ExpressionEngine currently has no system in place to trigger actions or hooks when an entry goes live or expires.

Solution: Scheduled Trigger. This add-on provides an endpoint that can be executed with a scheduled cron job configured to run at your desired interval. It’s extremely lightweight so setting it for every 5 minutes or so is no problem.

Details

Until now, if you relied on entry submission hooks to trigger cache clearing (be it native template caching, or a third party add-on for static caching or similar), scheduling entries to go live or expire at a specified time was pretty useless.

Scheduled Trigger adds any entries that are scheduled to go live in the future, or set to expire in the future to a queue. Every time the end point is executed (via scheduled cron) it checks the items in the queue against the current time and date. If an entry is past the schedule date, triggers are executed.

Examples

Let’s say you have a channel where members can publish classified adds which have a default expiration of 30 days after publishing. When the entry expires, the queue will trigger the appropriate EE entry submission hooks. This would allow you to have another add-on based on the entry submission hooks listening for expiration that would, for instance, send an email to the author that the entry has expired.

Or perhaps you are using EE template caching or using an add-on like Stash with Mustash to clear static caching when entry submission hooks are triggered. EE will not natively trigger hooks which would cause the cache clearing rules to be hit when the scheduled time arrives. Scheduled Trigger will trigger those hooks and the cache breaking rules will be executed.

Setup

Download and extract the package, then move the scheduled_trigger directory to your ExpressionEngine third_party folder. From the Add-Ons > Modules area of the EE control panel, install the module.

Once installed, you can find information about setting up the cron, and the URL for the endpoint to use with the cron setup on the Scheduled Trigger Module Page in the EE Control Panel.

Module Control Panel

The module control panel in ExpressionEngine has four tab areas:

Instructions

This is where you can get the instructions and end point for the cron job.

Queue

Here you can see any entries that have been schedule to publish or expire in the future.

Log

The log shows you recent entries that were formerly in the queue and have triggered hooks.

Settings

Here you can choose which channels to include in the queue, and which hooks can be triggered.

Hook Information

The extension hook is called with the $data[‘entry_id’] cleared, as if a new entry is published.

ee()->extensions->call('hook_name', $entry_id, $meta, $data);

Note: Scheduled Trigger does not handle return data, it is just a queued trigger.

Download Scheduled Trigger

EE Support Downloads Add-On Version Release Date
2.6.0+ Download 1.1.4 Oct 5, 2014

Scheduled Trigger Links

Hooks Used

If the add-on is an extension, and ties into ExpressionEngine's core files, it will use ExpressionEngine hooks. We are listing any hooks the add-on uses for developers to have an easier time locating other add-ons that they can reference for their own work.

  1. entry_submission_end
  2. delete_entries_loop
  3. update_multi_entries_loop

This entry was created March 3, 2014, 10:59 am.
This entry was last updated February 12, 2015, 11:43 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

1 Review:

Ottergoose 01.16.15

Rating - {addon_rating_average}

Just the ticket if you’re using CE Cache’s static driver and have scheduled / future entries on your site. Thanks!