-
Notifications
You must be signed in to change notification settings - Fork 228
/
Copy pathhourly_newsletter_frl.php
39 lines (27 loc) · 1.21 KB
/
hourly_newsletter_frl.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?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() . ') ---------------');