<?php ini_set('max_execution_time', '0'); ini_set('memory_limit', '512M'); require_once '../classes/config.php'; require_once '../classes/log.php'; $log = new log('massend-test-' . SERVER . '-%d%m%Y[%H].log', 'w'); $log->writeln('------------ BEGIN hourly (start time: ' . date('d.m.Y H:i:s') . ') -----'); require_once '../classes/stdf.php'; require_once '../classes/spam.php'; $spam = new spam(); $log->TRACE($spam->frlLowFundsOffers2());
ini_set('max_execution_time', 0); ini_set('memory_limit', '512M'); if (!isset($_SERVER['DOCUMENT_ROOT']) || !strlen($_SERVER['DOCUMENT_ROOT'])) { //@todo: укажите вместо '' относительное положение doc_root например '/../' $_SERVER['DOCUMENT_ROOT'] = rtrim(realpath(dirname(__FILE__) . ''), '/'); } require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/config.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/log.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/multi_log.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/smail.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/freelancer.php'; $log = new log('hourly_projects_newsletter/' . SERVER . '-%d%m%Y[%H].log', 'w'); $log->writeln('------------ BEGIN hourly (start time: ' . date('d.m.Y H:i:s') . ') -----'); //if((int)date('H') == 1) { //$mail = new smail(); //$log->TRACE(); //} //------------------------------------------------------------------------------ $mail = new smail(); //------------------------------------------------------------------------------ //ответившим на проекты (пока самый тяжелый) $log->TRACE($mail->sendFrlOffer()); //------------------------------------------------------------------------------ //исполнителям проектов $log->TRACE($mail->sendFrlProjectsExec()); //------------------------------------------------------------------------------ //работодателям проектов $log->TRACE($mail->sendEmpPrjFeedback()); //------------------------------------------------------------------------------ $log->writeln('------------ END hourly (total time: ' . $log->getTotalTime() . ') ---------------');
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users_suspicious_contacts.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/FreelancerCatalog.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/annoy.php'; $mail = new smail(); $mail2 = new smail2(); $spam = new spam(); $H = (int) date('H'); /* * Чистим счетчик неправильного * ввода пароля для пользователя */ annoy::clearRepeatPassByCnt(); //$cfile = new CFile(); //$log->TRACE( $cfile->removeDeleted() ); if ($H == 0) { $log->TRACE($traffic_stat->calculateStatsIp()); } // Обновляем карту сайта // try { // $log->TRACE( sitemap::update('blogs') ); // } catch(Exception $e) { // $log->TRACE($e->getMessage()); // } try { $log->TRACE(sitemap::update('projects')); } catch (Exception $e) { $log->TRACE($e->getMessage()); } try { $log->TRACE(sitemap::update('commune')); } catch (Exception $e) {
<?php /** * Обработка новых рассылок. */ ini_set('max_execution_time', '0'); ini_set('memory_limit', '512M'); require_once 'classes/config.php'; require_once 'classes/log.php'; require_once 'classes/mailer.php'; $log = new log('massend/massend-trace-' . SERVER . '-%d%m%Y[%H].log', 'w'); $log->writeln('------------ BEGIN hourly_spam (start time: ' . date('d.m.Y H:i:s') . ') -----'); $mailer = new mailer(); $log->TRACE($mailer->digestSend()); $log->TRACE($mailer->getMailerSend()); $log->writeln('------------ END hourly_spam (total time: ' . $log->getTotalTime() . ') ---------------');
if (date('i') % 15 == 0) { // проверка статусов платежей paymaster при возврате require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/pmpay.php"; $pm = new pmpay(); if (DEBUG) { $pm->setDebugUrl($GLOBALS['host'] . '/norisk2/admin/pm-server-test.php'); } $pm->checkRefund(); } if (SERVER === 'release') { /* * @todo: https://beta.free-lance.ru/mantis/view.php?id=29134#c87337 * require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/qiwipay.php"); $qiwipay = new qiwipay(); $qiwipay->checkBillsStatus($error); */ if (date('i') % 10 == 0) { // проверка статусов платежей paymaster require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/pmpay.php"; $pm = new pmpay(); $pm->checkInvoiced(); } } // запускаетс¤ в 0 и 1 минуту каждого часа с начала суток до 5 утра if (date('i') == 0 && date('H') >= 0 && date('H') <= 5) { $log = new log('minutly/' . SERVER . '-%d%m%Y[%H].log', 'w'); // разморозка ѕ–ќ $log->TRACE(payed::freezeUpdateProUsers()); } professions::autoProlongSpecs();
* «апускать каждый час * * –ассылка уведомлений о * наличии новых заказов дл¤ исполнителей за 24 и 72 часа * возможности оставить отзыв после завершени¤ заказа за 24 и 72 часа. * */ //ini_set('display_errors',1); //error_reporting(E_ALL ^ E_NOTICE); ini_set('max_execution_time', 0); ini_set('memory_limit', '512M'); if (!isset($_SERVER['DOCUMENT_ROOT']) || !strlen($_SERVER['DOCUMENT_ROOT'])) { //@todo: укажите вместо '' относительное положение doc_root например '/../' $_SERVER['DOCUMENT_ROOT'] = rtrim(realpath(dirname(__FILE__) . ''), '/'); } require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/config.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/log.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/multi_log.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/tservices/tservices_smail.php"; $log = new log('hourly_tservices_orders/' . SERVER . '-%d%m%Y.log'); $log->writeln('------------ BEGIN hourly (start time: ' . date('d.m.Y H:i:s') . ') -----'); //------------------------------------------------------------------------------ try { $tservices_smail = new tservices_smail(); $log->TRACE($tservices_smail->inactiveOrders()); $log->TRACE($tservices_smail->noneFeedbackOrders()); } catch (Exception $e) { $log->TRACE($e->getMessage()); } //------------------------------------------------------------------------------ $log->writeln('------------ END hourly (total time: ' . $log->getTotalTime() . ') ---------------');
<?php /* * Скрипт рассылки о новых проектах для работодателей * Запускать раз в сутки! */ //ini_set('display_errors',1); //error_reporting(E_ALL ^ E_NOTICE); ini_set('max_execution_time', 0); ini_set('memory_limit', '512M'); if (!isset($_SERVER['DOCUMENT_ROOT']) || !strlen($_SERVER['DOCUMENT_ROOT'])) { //@todo: укажите вместо '' относительное положение doc_root например '/../' $_SERVER['DOCUMENT_ROOT'] = rtrim(realpath(dirname(__FILE__) . ''), '/'); } require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/config.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/log.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/multi_log.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/smail.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects.php'; $log = new log('hourly_newsletter_emp/' . SERVER . '-%d%m%Y[%H].log', 'w'); $log->writeln('------------ BEGIN hourly (start time: ' . date('d.m.Y H:i:s') . ') -----'); //if((int)date('H') == 1) { $mail = new smail(); $log->TRACE($mail->EmpNewProj()); //} $log->writeln('------------ END hourly (total time: ' . $log->getTotalTime() . ') ---------------');
define('IS_OPENED', true); if (!$_SERVER['DOCUMENT_ROOT']) { $_SERVER['DOCUMENT_ROOT'] = dirname(__FILE__); } require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/config.php"; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/sbr.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/pskb.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/log.php'; $log = new log('hourly_sbr/' . SERVER . '-%d%m%Y[%H].log', 'w'); $log->writeln('------------ BEGIN hourly_sbr (start time: ' . date('d.m.Y H:i:s') . ') -----'); /** * Проверяем сделки на просрочку */ $sbr_meta = new sbr_meta(); $sbr_meta->renewalWorkStagesByFrozen(); //if(date('G') == 1) { $sbr_meta->checkStageOvertime(); //} if (date('H') == 0 || date('H') == 1) { pskb::checkExpired(); } if (date('H') % 4 == 0) { // раз в 4 часа pskb::checkBankCovered(); pskb::checkStagePayoutsCompleted(); } // Должен отработать все сделки до 15 декабря $log->TRACE(pskb::fillingSuperCheck()); if (date('H') == 23) { pskb::prolongPaused(); }
<?php /* * Скрипт рассылки о новых проектах для фрилансеров * Запускать раз в сутки! */ //ini_set('display_errors',1); //error_reporting(E_ALL ^ E_NOTICE); ini_set('max_execution_time', 0); ini_set('memory_limit', '512M'); if (!isset($_SERVER['DOCUMENT_ROOT']) || !strlen($_SERVER['DOCUMENT_ROOT'])) { //@todo: укажите вместо '' относительное положение doc_root например '/../' $_SERVER['DOCUMENT_ROOT'] = rtrim(realpath(dirname(__FILE__) . ''), '/'); } require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/config.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/log.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/multi_log.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/smail.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/projects.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/freelancer.php"; $log = new log('hourly_newsletter_frl/' . SERVER . '-%d%m%Y[%H].log', 'w'); $log->writeln('------------ BEGIN hourly (start time: ' . date('d.m.Y H:i:s') . ') -----'); //if((int)date('H') == 1) { $mail = new smail(); $log->TRACE($mail->NewProj2()); //} $log->writeln('------------ END hourly (total time: ' . $log->getTotalTime() . ') ---------------');
$log = new log('empproj/' . SERVER . '-%d%m%Y[%H].log', 'w'); //------------------------------------------------------------------------------ $DB = $GLOBALS['DB']; $H = (int) date('H'); //текущий час $start_hour = 1; //час начала //индекс по расписанию $key = $start_hour - $H; //расписание обновлений $schedule = array(0 => "reg_date >= '2013-01-01' AND reg_date < '2014-01-01'", 1 => "reg_date >= '2012-01-01' AND reg_date < '2013-01-01'", 2 => "reg_date >= '2011-01-01' AND reg_date < '2012-01-01'", 3 => "reg_date >= '2010-01-01' AND reg_date < '2011-01-01'", 4 => "reg_date >= '2009-01-01' AND reg_date < '2010-01-01'", 5 => "reg_date >= '2008-01-01' AND reg_date < '2009-01-01'", 6 => "reg_date >= '2007-01-01' AND reg_date < '2008-01-01'", 7 => "reg_date < '2007-01-01'"); //Нет ничего в расписании if (!isset($schedule[$key])) { exit; } $log->writeln('------------ BEGIN hourly (start time: ' . date('d.m.Y H:i:s') . ') -----'); if ($key == 0) { $log->TRACE($DB->query(' DROP INDEX IF EXISTS "ix employer/is_spm_subscr"; ')); $log->writeln("DROP INDEX: ix employer/is_spm_subscr"); } //На момент обновлений в БД 457235 записей $log->TRACE($DB->query("\n UPDATE employer \n SET \n subscr = subscr & B'1111111111110111' --12 бит вырубаем ежедневную рассылку\n WHERE \n {$schedule[$key]} \n AND subscr & B'0000000000001000' = B'0000000000001000'\n AND is_banned = B'0';\n")); $log->writeln("UPDATE EXECUTED FOR: {$schedule[$key]}"); if ($key == count($schedule) - 1) { $log->TRACE($DB->query("\nCREATE INDEX \"ix employer/is_spm_subscr\"\n ON employer\n USING btree\n (uid)\n WHERE \n subscr & B'0000000000001000' = B'0000000000001000'\n AND is_banned = B'0'::\"bit\"; \n")); $log->writeln("CREATE INDEX: ix employer/is_spm_subscr"); } $log->writeln('------------ END hourly (total time: ' . $log->getTotalTime() . ') ---------------'); exit;