
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
Inception Plot QuestionsRandom Chuck Norris Fact Generator With A Twist
Virtual Currency for Buses
Applying ColdFusion Security Patches Gotcha
Privacy, Walled Gardens, Standards and Our Future
Recent Comments
FireFox 3.6 KTML Editor Fix
rock guitar said: Is the ktml realy discontinued for dreamweaver
[More]
FireFox 3.6 KTML Editor Fix
Joshua said: Hi Wayne,
I just tried opening the editor in IE from the link you supplied. I was able to open the ...
[More]
FireFox 3.6 KTML Editor Fix
wayne said: Hi everybody, thanks for your reply joshua. I still have a bug for ktml in asp for a link properties...
[More]
Inception Plot Questions
said:
[More]
Inception Plot Questions
Taylor said: Hey there Josh,
Great questions all. You seem to think this is more of a Jacob's Ladder equivalent ...
[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 |
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 (19) [RSS]
RPM (9) [RSS]
Spam (16) [RSS]
Technology (68) [RSS]
Testing (3) [RSS]
TV (15) [RSS]
video (32) [RSS]
Web Dev (224) [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.