forked from borazslo/miserend.hu
/
cron.php
43 lines (34 loc) · 920 Bytes
/
cron.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
40
41
42
43
<?php
include 'load.php';
set_time_limit('300');
ini_set('memory_limit', '512M');
switch ($_REQUEST['q']) {
case 'hourly':
clearoutTokens();
clearoutMessages();
updateOverpass(50);
updateDistances();
break;
case 'daily':
clearoutVolunteers();
deleteOverpass();
updateOSM();
for ($v = 1; $v < 5; $v++) {
$file = 'fajlok/sqlite/miserend_v' . $v . '.sqlite3';
generateSqlite($v, $file);
//upload2ftp('*url*','*user*','*password*','web/'.$file,$file);
}
break;
case 'weekly':
assignUpdates();
updateImageSizes();
generateMassTmp();
updateCleanMassLanguages();
updateGorogkatolizalas();
updateDeleteZeroMass();
updateComments2Attributes();
//not so fast!
updateAttributesOptimalization();
break;
}
?>