Countdown timer for schedule unpublish date I am using Scheduler module in order to enable unpublish date for a content type.

Now I want to create countdown timer for the nodes that unpublish date is set for them.

I checked jQuery Countdown and Countdown Timer Field modules but it seems they can't help in this issue.

What is your suggestion? Is there any way to create a relation between node unpublish date and countdown_timer modules or I must edit source of themes?

Thanks a lot for your help
You could add the snippet below as a new module scheduler_unpublish_countdown. It defines a block which you can shown on the node page of any content type you choose and allow it to countdown to the scheduled unpublish time for that node. As the block that comes with the jquery_countdown module counts down to a global event; this might be better for your use case.

&lt;?php

/**
 * Implements hook_block_info().
 */
function scheduler_unpublish_countdown_block_info() {
  return array(
    'unpublish_countdown' =&gt; array(
      'info' =&gt; t('Scheduler Unpublish Countdown'),
      'cache' =&gt; DRUPAL_NO_CACHE
    )
  );
}

/**
 * Implements hook_block_view().
 */
function scheduler_unpublish_countdown_block_view($delta) {
  if ($delta == 'unpublish_countdown') {
    $node = menu_get_object();
    // Ignore non-node pages, already unpublished nodes, nodes that don't have a 
    // date/time set for unpublishing and nodes whose unpublishing date-time is in the past.
    if (!$node || 
      empty($node-&gt;status) || 
      empty($node-&gt;scheduler['unpublish_on']) || 
      ($node-&gt;scheduler['unpublish_on'] &lt;= REQUEST_TIME)) {
      return;
    }
    $variables = array(
      'id' =&gt; drupal_html_id('jquery_countdown-' . $delta),
      'options' =&gt; array(
        'until' =&gt; date("F d, Y g:i a", $node-&gt;scheduler['unpublish_on']),
        'description' =&gt; ' ', // So that the CSS doesn't get screwed
        // Reload the page when the countdown is done
        'onExpiry' =&gt; '(function() { location.reload(); })', 
      )
    );
    return array(
      'subject' =&gt; t('Scheduled unpublish in..'),
      'content' =&gt; theme('jquery_countdown', $variables)
    );
  }
}


Once the countdown is complete, the page will simply reload (see onExpiry option above). As unpublishing happens only either during the normal Drupal cron run or through the Scheduler's own light-weight variant, it may not happen exactly at the time of unpublishing meaning the page would reload and nothing would happen (except for the timer not showing up anymore) which might be slightly awkward.

I'd recommend, therefore, to redirect to a custom page once the countdown expires where you explicitly call _scheduler_unpublish() and then redirect back to the node page. You might want to send a one-time-only token along for security.

Remember to add scheduler and jquery_countdown as dependencies for your new module.