Welcome, Guest
Username: Password: Remember me

TOPIC: Auto Unpublish, Auto Publish Down if expired

Auto Unpublish, Auto Publish Down if expired 13 May 2013 04:47 #7176

  • Maujb
  • Maujb's Avatar
  • Offline
  • Junior Member
  • Posts: 27
  • Thank you received: 2
  • Karma: 2
Hi all,
I am creating a component that has 'start date' and 'end date'.
I would like to automatically unpublish the item id the date is older than the current date.

Does anyone have any clue how to do it?

Thanks
The administrator has disabled public write access.

Re: Auto Unpublish, Auto Publish Down if expired 13 May 2013 14:06 #7182

  • vlemos
  • vlemos's Avatar
  • Online
  • Elite Member
  • Posts: 295
  • Thank you received: 41
  • Karma: 21
Hi Maujb

One way this can be accomplished is by using a standalone script as a cron. On the server, the script should be setup as a scheduled task to run at given intervals. It would then check for current and expired records and publish or un-publish them based on the server-time.

Read this link to understand how to connect to your component from an external script: Connecting to J-Cook from external Scripts / Crons

Your hosting provider should have the info you will need to schedule a task on their server.

Let me know if this helps.

Regards
v
The administrator has disabled public write access.
Time to create page: 0.058 seconds

Get Started