1

I am creating a plugin for Jomres and one of its functionalities is to send an email to a customer after a number of minutes, hours, days, or weeks from the raised date, which is specified by the admin. I added these to plugin_install.php:

jr_import('jomres_cron');
$cron = new jomres_cron($displayLog);
$cron->addJob("email","","");

then inserted that in the column "job" and the admin's preferred option (M/H/D/W) in the column "schedule" in the table #__jomcomp_cron. Where should I put the number of M/H/D/W in the database?

Now I created j06000cron_email.class.php and I plan to pattern it from j06000cron_invoice.class.php but honestly I'm having a hard time figuring things out. I see the line jr_import( 'invoicehandler' ); which means I have to create a emailhandler.class.php too. I suppose that will contain functions like fetching the bookings' raised date? How can I check if it had been already n minutes/hours/weeks/days so the email can be sent? I humbly ask for your guidance in implementing this cron job.

Thanks a lot.

symcbean
  • 47,736
  • 6
  • 59
  • 94
user4668176
  • 91
  • 1
  • 2

0 Answers0