How can I trigger a rule when there's no more scheduled content? I have a Drupal 7 blog where I write content in advance and publish it using the Scheduler module. I'd like to be able to write a rule to send me an email when the site has published the last scheduled node available. I have a View set up which lists all the scheduled nodes, but I can't figure out how to get the result count of that view into the condition of a rule. I've got Views Bulk Operations and Views Rules installed, but I can't figure out how to use either of those how I need to.
You can make this work also by using Rules in combination with the Views Bulk Operations module, as further detailed below.

Step 1

Use the Views Bulk Operations module to create a view of all your "nodes to be published" (as in your question), in which you add a VBO field to it. Simply include a field like nid for each node (no need for any other fields). Just make sure you get exactly 1 row for each node you want to take into consideration.

Step 2

Create a Rules Component with a Rules Condition "Check number of results returned by a VBO view". And select the VBO view created in the previous step. If the number of results is below 1, then perform a Rules Action (in that Rules Component) to trigger your eMail.

Step 3

Create a Rule like so:


Use some relevant Rules Event related to those nodes to be published.
Don't use any Rules Conditions (there is no need for them in this rule).
Perform a Rules Action to execute the Rules Component from Step 2.


If you cannot think of any relevant Rules Event that would fit for such rule, then just create a Rules Component which has (only) 2 Rules Actions:


Perform a Rules Action to execute the Rules Component from Step 2.
Reschedule this (extra) Rules Component itself, eg after X mins or hours 


Then trigger the very first execution of this Rules Component using the Rules UI.

Done!