We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Please Help! Cron is not working!!![Answered] | Forum

Topic location: Forum home » Support » General Questions
Jamaal Simpson
Jamaal Simpson Apr 22 '11
Since I've updated to 1.1.1, my cron has been returning emails to my email account, but they are blank emails that contain no info.

The subject line is simply:

Cron /usr/local/bin/php /home/gkbmini1/public_html/GKBGlobal/ow_cron/run.php

but there is no body content. Can you help me figure out what the problem is? Here's what the run.php file contains:


/**
* EXHIBIT A. Common Public Attribution License Version 1.0
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”);
* you may not use this file except in compliance with the License. You may obtain a copy of the License at
* http://www.oxwall.org/license. The License is based on the Mozilla Public License Version 1.1
* but Sections 14 and 15 have been added to cover use of software over a computer network and provide for
* limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent
* with Exhibit B. Software distributed under the License is distributed on an “AS IS” basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language
* governing rights and limitations under the License. The Original Code is Oxwall software.
* The Initial Developer of the Original Code is Oxwall Foundation (http://www.oxwall.org/foundation).
* All portions of the code written by Oxwall Foundation are Copyright (c) 2011. All Rights Reserved.

* EXHIBIT B. Attribution Information
* Attribution Copyright Notice: Copyright 2011 Oxwall Foundation. All rights reserved.
* Attribution Phrase (not exceeding 10 words): Powered by Oxwall community software
* Attribution URL: http://www.oxwall.org/
* Graphic Image as provided in the Covered Code.
* Display of Attribution Information is required in Larger Works which are defined in the CPAL as a work
* which combines Covered Code or portions thereof with code not governed by the terms of the CPAL.
*/
/**
* @author Nurlan Dzhumakaliev
* @package ow_cron
* @since 1.0
*/
define('_OW_', true);

define('DS', DIRECTORY_SEPARATOR);

define('OW_DIR_ROOT', substr(dirname(__FILE__), 0, - strlen('ow_cron')));

define('OW_CRON', true);

$_SERVER['REQUEST_URI'] = ''; // just a hack that kills the annoying notice

require_once(OW_DIR_ROOT . 'ow_includes' . DS . 'init.php');

$application = OW_Application::getInstance();

$application->init();

$plugins = BOL_PluginService::getInstance()->findActivePlugins();

foreach ( $plugins as $plugin )
{
/* @var $plugin BOL_Plugin */
$pluginRootDir = OW::getPluginManager()->getPlugin($plugin->getKey())->getRootDir();
if ( file_exists($pluginRootDir . DS . 'cron.php') )
{
include $pluginRootDir . DS . 'cron.php';
$className = strtoupper($plugin->getKey()) . '_Cron';
$cron = new $className;

$runJobs = array();
$newRunJobDtos = array();

foreach ( BOL_CronService::getInstance()->findJobList() as $runJob )
{
/* @var $runJob BOL_CronJob */
$runJobs[$runJob->methodName] = $runJob->runStamp;
}

$jobs = $cron->getJobList();

foreach ( $jobs as $job => $interval )
{
$methodName = $className . '::' . $job;
$runStamp = ( isset($runJobs[$methodName]) ) ? $runJobs[$methodName] : 0;
$currentStamp = time();
if ( ( $currentStamp - $runStamp ) > ( $interval * 60 ) )
{
$cron->$job();

$runJobDto = new BOL_CronJob();
$runJobDto->methodName = $methodName;
$runJobDto->runStamp = $currentStamp;
$newRunJobDtos[] = $runJobDto;
}
}

if ( count($newRunJobDtos) > 0 )
{
BOL_CronService::getInstance()->batchSave($newRunJobDtos);
}
}
}
The Forum post is edited by ross Nov 24 '13
Brooklyn Sweet
Brooklyn Sweet Apr 22 '11
did you edit this page???? you shouldnt mess with that page but your missing
The Forum post is edited by Brooklyn Sweet Apr 22 '11
Jamaal Simpson
Jamaal Simpson May 10 '11
no, i did not edit this page
Den Team
Den May 11 '11
Are you able to receive mass mailing from your site?
Webster Molaudi
Webster Molaudi Nov 22 '13

I also have the same issue :(

Message:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 1' at line 1

File:

/home/myvirgo3/public_html/ow_core/database.php

Line:

331

Trace:

#0 /home/myvirgo3/public_html/ow_core/database.php(331): PDOStatement->execute()

#1 /home/myvirgo3/public_html/ow_core/database.php(397): OW_Database->execute('SELECT * FROM o...', Array)

#2 /home/myvirgo3/public_html/ow_core/base_dao.php(114): OW_Database->queryForObject('SELECT * FROM o...', 'BOL_User', Array, 0, Array)

#3 /home/myvirgo3/public_html/ow_system_plugins/base/bol/user_dao.php(124): OW_BaseDao->findObjectByExample(Object(OW_Example))

#4 /home/myvirgo3/public_html/ow_system_plugins/base/bol/user_service.php(294): BOL_UserDao->findByUserName(NULL)

#5 /home/myvirgo3/public_html/ow_plugins/uavatars/classes/plugin.php(144): BOL_UserService->findByUsername(NULL)

#6 [internal function]: UAVATARS_CLASS_Plugin->onFinalize(Object(OW_Event))

#7 /home/myvirgo3/public_html/ow_core/event_manager.php(176): call_user_func(Array, Object(OW_Event))

#8 /home/myvirgo3/public_html/ow_core/application.php(348): OW_EventManager->trigger(Object(OW_Event))

#9 /home/myvirgo3/public_html/index.php(76): OW_Application->finalize()

#10 {main}

Type:

PDOException

The Forum post is edited by Webster Molaudi Nov 22 '13
ross Team
ross Nov 24 '13
Try deactivating "uavatars" plugin. 
Seems like it is causing the Exception error. 
If  deactivation removes this error, you will need to contact plugin developer with this issue.