# Scheduler extension + r:children:each

**URL:** <https://www.ruby-forum.com/t/scheduler-extension-reach/128873>\
**Category:** Radiant CMS\
**Created:** [February 12, 2008, 10:21am UTC](https://www.ruby-forum.com/t/scheduler-extension-reach/128873 "2008-02-12T10:21:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bowenmark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/dc4da7/32.png) [@bowenmark](https://www.ruby-forum.com/u/bowenmark)\
**Post date:** [February 12, 2008, 10:21am UTC](https://www.ruby-forum.com/t/scheduler-extension-reach/128873/1 "2008-02-12T10:21:23Z")

</div>

Hi all,

I have the scheduler extension installed and use the following code in a  
layout:

\<r:find url="/news-and-events"\>  
\<r:children:each limit=“5” order=“desc” by=“published\_at”\>

### 

Posted

Now this is showing links to pages which have expired as r:children:each  
ignores the expires\_on value for the page.

I wonder if anyone can advise whether I would need to create my own tag  
to filter the children, or is it already possible to exclude expired  
pages using existing tags?

Cheers,  
Mark

---

<div class="post-metadata">

**Author:** ![bowenmark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/dc4da7/32.png) [@bowenmark](https://www.ruby-forum.com/u/bowenmark)\
**Post date:** [February 12, 2008, 3:31pm UTC](https://www.ruby-forum.com/t/scheduler-extension-reach/128873/2 "2008-02-12T15:31:09Z")

</div>

Mark,

It should obviously be doing that for you! My apologies. Let me patch  
in something real quick.

Sean

---

<div class="post-metadata">

**Author:** ![bowenmark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/dc4da7/32.png) [@bowenmark](https://www.ruby-forum.com/u/bowenmark)\
**Post date:** [February 12, 2008, 3:41pm UTC](https://www.ruby-forum.com/t/scheduler-extension-reach/128873/3 "2008-02-12T15:41:14Z")

</div>

Wow, top service 😉 Thanks, Sean.

Mark

---

<div class="post-metadata">

**Author:** ![bowenmark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/dc4da7/32.png) [@bowenmark](https://www.ruby-forum.com/u/bowenmark)\
**Post date:** [February 13, 2008, 2:47am UTC](https://www.ruby-forum.com/t/scheduler-extension-reach/128873/4 "2008-02-13T02:47:30Z")

</div>

DB-agnostic, too. Thanks! I had needed to change the query to work with  
a ms sql server.

Can you think of a good way to include expired content? I am using the  
expiry date on news items but I would also like to have an archive of  
old news. What do you think of having an “archive after expire” field in  
the scheduler extension? Then I could do something like:

\<r:children:each limit=“5” order=“desc” by=“published\_at”  
include\_archived=“true”\>

Any suggestions?

Cheers,  
Mark

---

<div class="post-metadata">

**Author:** ![bowenmark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/dc4da7/32.png) [@bowenmark](https://www.ruby-forum.com/u/bowenmark)\
**Post date:** [February 12, 2008, 4:37pm UTC](https://www.ruby-forum.com/t/scheduler-extension-reach/128873/5 "2008-02-12T16:37:26Z")

</div>

[http://dev.radiantcms.org/radiant/changeset/740](http://dev.radiantcms.org/radiant/changeset/740)

Cheers,

Sean

---

<div class="post-metadata">

**Author:** ![bowenmark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/dc4da7/32.png) [@bowenmark](https://www.ruby-forum.com/u/bowenmark)\
**Post date:** [February 13, 2008, 3:46pm UTC](https://www.ruby-forum.com/t/scheduler-extension-reach/128873/6 "2008-02-13T15:46:38Z")

</div>

Mark,

I think the problem you are trying to solve is different from the intent  
of the scheduler extension. The point of the extension is to make  
content disappear completely when it expires.

Sean
