How to schedule an article post. | Community
Skip to main content
January 25, 2017
Solved

How to schedule an article post.

  • January 25, 2017
  • 2 replies
  • 1757 views

I upload all my content files at the same time, but I want publish at different times throughout the week, but in doing so, they will be timestamped when I first uploaded the article. So if I publish the article on Friday, it says uploaded 37 hours ago, so to a reader it makes it look like an old article. I don't want to have to reload the .article content file every time to get a new time stamp.

 

Is there a way to schedule all these posts and have them post at that time, with that time stamp. It seems like something that would be standard? Am I missing something?

Thanks in Advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by huzaifaha985211

Do not rely on system times for your live site especially when scheduling a job the creation time will obviously be different than the publish time. It looks like you are displaying creation time value to your end user. Instead, create a new property called "articlePubDate" and add the value of the scheduled time you want to be displayed. Then use that property's value to display on the page. 

2 replies

huzaifaha985211
huzaifaha985211Accepted solution
Level 2
January 25, 2017

Do not rely on system times for your live site especially when scheduling a job the creation time will obviously be different than the publish time. It looks like you are displaying creation time value to your end user. Instead, create a new property called "articlePubDate" and add the value of the scheduled time you want to be displayed. Then use that property's value to display on the page. 

smacdonald2008
Level 10
January 26, 2017

Another option that you have is to create an AEM scheduler service. See: 

https://sling.apache.org/documentation/bundles/scheduler-service-commons-scheduler.html