0

I have a list of items that have some Publish End Dates that I want to check if date is passed it or not. If has passed system date, it should send an informational email to the owner of that item. How can I do it without logging on the site? I'm guessing that database-side scripting is necessary, but how it should be combined with joomla? Thanks.

GDP
  • 8,109
  • 6
  • 45
  • 82
freezer
  • 531
  • 1
  • 11
  • 28

1 Answers1

1

To my knowledge, there are not extensions that will do such a thing, so we've written custom scripts that run automatically each night. In short, we schedule PHP CLI to run our PHP scripts. The script selects the articles that qualify, then constructs an email, and uses phpMailer to send it.

It works wonderfully for us, as it doesn't depend on a page from the Joomla site to be loaded by a visitor to trigger the code to be executed.

UPDATE:
For details about scheduling PHP, see How to run a PHP file in a scheduled task (Windows Task Scheduler).
For details about including Joomla functions into a scheduled PHP script, see joomla component development with Ajax queries
Joomla Tutorial/Documentation at How to create a stand-alone application using the Joomla! Platform

Community
  • 1
  • 1
GDP
  • 8,109
  • 6
  • 45
  • 82
  • I dont want any page related to that script but how and where to write that script. Any example or suggestion or sample code can be helpful. I down want what the PHP CLI is if itis the host adminispration panel I am using parallel plesk. Thanks for reply – freezer Aug 06 '12 at 18:03
  • The CLI is the command line interface - in other words, just schedule php.exe to run at a certain time. In the paramters for that scheduled task, you specify the PHP script that it should load and run. Where or what that script resides or does is up to you. Added a link to my answer about scheduling the PHP cli. – GDP Aug 06 '12 at 18:24
  • can ı use the joomla's library functions like table or database ı want to do it with library functions. – freezer Aug 06 '12 at 19:20
  • Can do....answered this some time ago, updated my answer with the link. it's for J1.5, but you can do the same with J2.5 - just google Joomla 2.5 Platform API – GDP Aug 06 '12 at 19:28