diff --git a/server/lib/classes/cron.d/200-logfiles.inc.php b/server/lib/classes/cron.d/200-logfiles.inc.php
index e2d9e9bb9ec0c1df7dd237e6d3f49aea07ee1a75..203d3c0bdac821492ab8d02d68cd2fdf9da965ff 100644
--- a/server/lib/classes/cron.d/200-logfiles.inc.php
+++ b/server/lib/classes/cron.d/200-logfiles.inc.php
@@ -217,7 +217,7 @@ class cronjob_logfiles extends cronjob {
 			foreach($records as $rec){
 				$tmp_path = realpath($rec['document_root'].'/tmp');
 				if($tmp_path != '' && strlen($tmp_path) > 10 && is_dir($tmp_path) && $app->system->is_user($rec['system_user'])){
-					exec("cd ?; find . -mtime +1 -name 'sess_*' | grep -v -w .no_delete | xargs rm > /dev/null 2> /dev/null", $tmp_path);
+					$app->system->exec_safe("cd ?; find . -mtime +1 -name 'sess_*' | grep -v -w .no_delete | xargs rm > /dev/null 2> /dev/null", $tmp_path);
 				}
 			}
 		}