Skip to Content Skip to Menu

A new release of CB Auto Actions is here with some great new features. This release is primarily focusing on the new Batching functionality previously the Internal General and Internal Users usage. Check out the details below!

Some of you may already be familiar with Internal General and Internal Users, but basically these triggers allowed you to use CRON Tasks to run auto actions on a regular basis. Internal General had no user ran through the auto action and was good for site wide processing behavior. Internal Users ran your entire user base through an action for per user processing. The problem with this is Internal Users wasn't efficient. Most of the time you only needed to run a subset of users through your action. Now this is possible with the new Batches feature.

The Batches feature lets you configure a batch of auto actions to run against a pre-filtered list of users. You've quite a bit of control over this using simple to use condition parameters that you're used to in your auto actions themselves. First though you'll need to define the initial batch parameters as shown in the below example.

In this example we'll be processing auto actions against the entire user base in batches of 50. It will automatically redirect to the next batch (note this is optional) to continue until it is completed so be sure your wget or cURL CRON Tasks are configured to follow redirects if you want to utilize this behavior. Next lets configure what auto actions we want to run.

The Actions tab shown above lets you insert actions to be ran with your batch. It's done this way to allow fine control over what order they execute in as you can now customize the order, independent from the auto actions actual order, directly in your batches. Now lets filter the users down to something more manageable for the site.

The above is the Basic Filter tab. This provides a similar usage as the conditions you'd configure in your auto action. The big exception here is these filters directly filter the database query that is grabbing your sites entire list of users to be processed. In short it allows you to pre-filter your users BEFORE we pass them through any auto actions. This provides a MASSIVE performance improvement over trying to process your entire user base. In this example we're only allowing the batch to process for the 2 users with a username of admin or demo user. This can get a lot more advanced though!

The above is the Advanced Filters tab. This lets you directly add custom JOIN and WHERE statements to the database query giving complete freedom to customize what set of users you want to batch against. This can be helpful if you need to condition against a separate database table. For example you only want to batch against users who have joined a specific CB GroupJive Group or who have uploaded something using CB Gallery, etc..

Note the Internal General and Internal Users triggers have been officially removed. All existing auto actions using those triggers should migrate to Batches functionality on install. Existing URLs to Internal General and Internal Users usages should call the new batches functionality. It's recommended to update your CRON Task URLs, but isn't necessary for now as backwards compatibility will be maintained for a time.

That concludes the Batch feature, but the new stuff doesn't stop there. Some improvements have been made to auto actions themselves as well. First up is the ability to use a custom database query as the User for your auto action. You'll notice the "Code" and "Query" options for the "User" parameter. "Code" lets you run custom PHP to determine who the user or list of users are being ran through the auto action. "Query" lets you do the same except as a custom database query. Take a look below.

The above for example will grab the first 10 users from the _users database table and run them through the auto action. Note it will always run those 10 through anytime this auto action is ran. Next up is you can now condition against a database query as well.

You can also use the Code condition to condition against the result of custom PHP as well! The new conditions don't stop there though. You can also now quickly condition against users being connected to one another using the new Connections condition.

Notice the "User" parameter for this condition? This is also now available for several Custom condition types like View Access Levels and Usergroups to make it even easier to determine who you want to condition against.

Import/Export of auto actions has also been enabled so you can more easily manage and move your auto actions from site to site as needed. In addition to all of the above the following system actions have been implemented.

Page - Like

This logs an activity entry when a page is liked. To like a page use the "page.[page_id]" asset in a Like usage (typically in a CB Activity Module).

Page - Comment

This logs an activity entry when a page is commented on. To comment on a page use the "page.[page_id]" asset in a Comment usage (typically in a CB Activity Module).

CB Activity - Global Post Notification

This logs a global notification when a global activity post is made on any activity stream. A good way for moderators to notify everyone!


Hope everyone can find some new awesome usages for the new Batches feature! For a full change log please see the below.

Facebook Twitter LinkedIn