
scheduling publication and expiration of content
Today I am working on code to allow a user to schedule content publication on a certain date. The user should also be able to specify an expiration date for content.
We already have a history object, and a pending object so that will work nicely.
My plan is to have two new tables. One for Scheduled Publication and another for Scheduled Expiration.
Create a scheduled task in ColdFusion that would then find any records that are scheduled for the date/time and if it finds them trigger the following.
Scheduled Publication: - trigger the normal publication process. This should automatically publish the pending object, and store the old object into the history table.
Scheduled Expire: - Trigger the revert code already existing to revert the content object in question to the previous published content. This will take a copy of the existing content and move it to the history table. Take a copy of the next oldest content in the history table and make that the live content.
My only worry is how often to schedule. Every 15 minutes?
Also, can I rely on cfschedule for this? I don't mind if the server is rebooting and misses a scheduled task, as 15 minutes later it will trigger. But just how reliable is cfschedule these days (on all platforms)? I need it to also be supported at all the traditional web hosts for shared hosting accounts.
The user interface is also a concern. Right now it is very clean and simple to make a content update. But now someone needs to be able to specify if content should be scheduled for something. Where do I add that to my UI and process? I am hesitant to have it on the edit screen, as often people edit multiple times before they are ready to schedule or publish.
My thought is to have it as an option after one edits and saves and previews. At that point click on the 'schedule publication' link or 'Schedule Expiration'.
I really also should add rights for these items. Or can I infer that someone with History rights should be able to schedule expiration (which is really just automating the history revert function)? And same with publish rights.

NAVIGATION
HomeAbout Me
RSS
Search
Subscribe
Recent Entries
Flash Camp BostonNew Blog Design
Pre-Conference Training at cf.Objective()
FireFox 3.6 KTML Editor Fix
I am now a part of the Adobe Community Professionals Group
Recent Comments
FireFox 3.6 KTML Editor Fix
Fred said: Found another bug in Firefox 3.6
When inserting a table you can't select the number of columns.
So I...
[More]
Repeating Events Question
ueghbxedu said: UaejcB <a href="http://ysyhrmkbkhco.com/&...;, [url=http://pwncz...
[More]
Repeating Events Question
fadxkfyuadn said: n6qVCL <a href="http://bdiorhdtbwzb.com/&...;, [url=http://uvnao...
[More]
FireFox 3.6 KTML Editor Fix
Joshua said: While changing that far will load the editor, does it show the drop down class menu correctly now?
[More]
FireFox 3.6 KTML Editor Fix
Al Johnson said: HI,
I am still fighting to keep my code going as there is nothing better than KTML nad I have writt...
[More]
Calendar
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
Archives By Subject
blogs (31) [RSS]books (4) [RSS]
Crazy (39) [RSS]
DIY (8) [RSS]
Flex (3) [RSS]
games (10) [RSS]
GRRR (13) [RSS]
Ideas (11) [RSS]
Local (14) [RSS]
LOLpics (2) [RSS]
money (9) [RSS]
music (3) [RSS]
Personal (27) [RSS]
Photos (8) [RSS]
Politics (8) [RSS]
Projects (22) [RSS]
Review (18) [RSS]
RPM (9) [RSS]
Spam (16) [RSS]
Technology (66) [RSS]
Testing (3) [RSS]
TV (15) [RSS]
video (32) [RSS]
Web Dev (218) [RSS]
World of Warcraft (16) [RSS]

Just realized that I don't have a link to the CMS on my site. I need to fix that this weekend.
http://www.besavvy.com I am the lead developer for Savvy Content Manager.
cfschedule: I have had great success with scheduled tasks on CFMX 6 & 7 for windows on both shared and dedicated servers. I have noticed that they don't always run exactly at the time specified. Some times they run few minutes delayed. But I haven't had any problems with completely skipped tasks.
Most of my tasks repeat once a day normally in the middle of the night. But I have ran some logging type tasks that run many times a day and I have been very happy with results.
Also I like have my tasks email me when they complete and/or if there is an error.
Shared Hosting:
- From your tools menu an admin user should be able to (re)create/delete/run the task. Since they won't have access to CFadmin.
- It would help if the created task would have the account name or domain name as the prefix to task's name. (ie. usefulconcept_com_publish_objects_task). This would be useful when talking with techsupport... if there is an issue with the task. This would also help make the task name unique if other people on the same server also running your software. (Although you probably thought of that.)
Do you think that the expiration / scheduling I described would cover all needs that your client would have?
I think the task would be automatically created and named unique. Perhaps I can make the interval configurable by the install. 15 min, 30 min, etc?
I just finished the site user rights code and all group/user management. Just need to finish this scheduling stuff and some other fine tuning. Then make the install scripts.
Task Scheduling: Instead of a 15min (or 30min) reoccurring task, have you thought about the pros and cons of each object that would need to be scheduled creating its own post and/or kill one-time tasks? If you kept a record of those tasks in a table you could also clean-up old tasks.