Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

  • Maujb
  • Maujb's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 27
  • Thank you received: 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

Please Log in or Create an account to join the conversation.

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

  • vlemos
  • vlemos's Avatar
  • Away
  • Elite Member
  • Elite Member
  • Posts: 295
  • Thank you received: 41
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

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.079 seconds

  I found "cook" two days ago. Played around with it for a day and then within a day got rid of two legacy applications in IBM Lotus Domino Notes and replaced them with "cook". It was really easy. A piece of cake. Actually it was even easier than cooking. Cooking involves more work than developing with "cook". What can I say about "cook"? Great application great price for what it delivers great forum with a lot of information and fast responses active and friendly community fast forward moving development cycle So what should I say "Monsieur Le Cook"? Keep the good work going it will lead to success. Having become a paying member in the words of Edith Piaf may I say ..... non rien de rien ... je ne regrette rien. Vive La France.
FK (JED)
         

Get Started