cheesegrits
Support Gopher
Yes, it should.
Have a look in your #__fabrik_log table, see if there are any clues in there.
-- hugh
Have a look in your #__fabrik_log table, see if there are any clues in there.
-- hugh
For running J!5.1 you must https://fabrikar.com/forums/index.php?wiki/update-from-github/ or include the new file manually https://fabrikar.com/forums/index.php?threads/joomla-5-1-and-fabrik-cannot-find-files-error.54473/post-285151 See also Announcements
Please see our announcement here.
I just don't know what to put in the "run_schedule_resource_reminder_emails.php" file. I came across a feature within "ProjectFork" that does something similar; per the following./usr/bin/php /path/to/site/cli/run_schedule_resource_reminder_emails.php
<?php
/**
* @package Projectfork Notifications
*
* @author Tobias Kuhn (eaxs)
* @copyright Copyright (C) 2006-2013 Tobias Kuhn. All rights reserved.
* @license http://www.gnu.org/licenses/gpl.html GNU/GPL, see LICENSE.txt
*/
// Initialize Joomla framework
const _JEXEC = 1;
// Load system defines
if (file_exists(dirname(__DIR__) . '/defines.php')) {
require_once dirname(__DIR__) . '/defines.php';
}
if (!defined('_JDEFINES')) {
define('JPATH_BASE', dirname(__DIR__));
require_once JPATH_BASE . '/includes/defines.php';
}
// Get the framework.
require_once JPATH_LIBRARIES . '/import.legacy.php';
// Bootstrap the CMS libraries.
require_once JPATH_LIBRARIES . '/cms.php';
/**
* Cron job to send Projectfork notifications
*
* @since 4.2
*/
class PFNotificationCron extends JApplicationCli
{
/**
* Entry point for the script
*
*/
public function doExecute()
{
$mailfrom = JFactory::getConfig()->get('mailfrom');
$fromname = JFactory::getConfig()->get('fromname');
$db = JFactory::getDbo();
// Get plugin params
$query = $db->getQuery(true);
$query->select('params')
->from('#__extensions')
->where('element = ' . $db->quote('pfnotifications'))
->where('type = ' . $db->quote('plugin'));
$db->setQuery($query);
$plg_params = $db->loadResult();
$params = new JRegistry();
$params->loadString($plg_params);
$limit = (int) $params->get('cron_limit');
// Get a list of emails to send
$query->clear();
$query->select('id, email, subject, message, created')
->from('#__pf_emailqueue')
->order('id ASC');
$db->setQuery($query, 0, $limit);
$items = $db->loadObjectList();
if (!is_array($items)) $items = array();
// Send and delete each email
foreach ($items AS $item)
{
$mailer = JFactory::getMailer();
$mailer->sendMail($mailfrom, $fromname, $item->email, $item->subject, $item->message);
$query->clear();
$query->delete('#__pf_emailqueue')
->where('id = ' . (int) $item->id);
$db->setQuery($query);
$db->execute();
}
}
}
JApplicationCli::getInstance('PFNotificationCron')->execute();
I didn't test again, but this is what I'd found in https://github.com/Fabrik/fabrik/issues/1591The last run would only get reset if reschedule() was run,
Unlike the way it's done in pfnotifications_j3.php; what I would like to know is the code to just run my Fabrik schedule in the same way that I do when I manually run it on the administrator end because the schedule always works correctly when I do it manually. If this should work; then could I trouble you folks for a sample of this code that I could put into a run_schedule_resource_reminder_emails.php" file?
Thanks in advance.
If I manually run the same Fabrik schedule in the back end then it works and sends the reminder email correctly. It also sends the schedule event log email that says the following:updates 0 records email listid = 11 SELECT SQL_CALC_FOUND_ROWS DISTINCT `bw_resources`.`id` AS `bw_resources___id`, `bw_resources`.`id` AS `bw_resources___id_raw`, `bw_resources`.`date_time` AS `bw_resources___date_time`, `bw_resources`.`date_time` AS `bw_resources___date_time_raw`, `bw_resources`.`name` AS `bw_resources___name`, `bw_resources`.`name` AS `bw_resources___name_raw`, `bw_resources`.`reminder_date` AS `bw_resources___reminder_date`, `bw_resources`.`reminder_date` AS `bw_resources___reminder_date_raw`, `bw_resources`.`scan_docs` AS `bw_resources___scan_docs`, `bw_resources`.`scan_docs` AS `bw_resources___scan_docs_raw`, `bw_resources`.`current_status` AS `bw_resources___current_status`, `bw_resources`.`current_status` AS `bw_resources___current_status_raw`, `bw_resources`.`id` AS slug , `bw_resources`.`id` AS `__pk_val` FROM `bw_resources` ORDER BY `bw_resources`.`name` ASC
The condition of the related record didn't change within the 2 minutes that I did this test of both. It seems like the wget process has different results than the manual run of the same schedule.updates 1 records email listid = 11