Skip to content

Commit 4bf3f93

Browse files
committed
Fixed: FS#1116 - Cron error
1 parent b103e5c commit 4bf3f93

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/cron_daily.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ function setConfigVar( $filename, $varName, $varValue ) {
186186
foreach($records as $rec){
187187
$tmp_path = realpath(escapeshellcmd($rec["document_root"].'/tmp'));
188188
if($tmp_path != '' && strlen($tmp_path) > 10 && is_dir($tmp_path) && $app->system->is_user($rec['system_user'])){
189-
exec("cd ".$tmp_path."; find -ctime +1 -user ".escapeshellcmd($rec['system_user'])." | grep -v -w .no_delete | xargs rm &> /dev/null");
190-
if($app->system->is_user('www-data')) exec("cd ".$tmp_path."; find -ctime +1 -user www-data | grep -v -w .no_delete | xargs rm &> /dev/null");
191-
if($app->system->is_user('wwwrun')) exec("cd ".$tmp_path."; find -ctime +1 -user wwwrun | grep -v -w .no_delete | xargs rm &> /dev/null");
189+
exec("cd ".$tmp_path."; find -ctime +1 -user ".escapeshellcmd($rec['system_user'])." | grep -v -w .no_delete | xargs rm &> /dev/null 2> /dev/null");
190+
if($app->system->is_user('www-data')) exec("cd ".$tmp_path."; find -ctime +1 -user www-data | grep -v -w .no_delete | xargs rm &> /dev/null 2> /dev/null");
191+
if($app->system->is_user('wwwrun')) exec("cd ".$tmp_path."; find -ctime +1 -user wwwrun | grep -v -w .no_delete | xargs rm &> /dev/null 2> /dev/null");
192192
}
193193
}
194194
}

0 commit comments

Comments
 (0)