Browse Source

write y reload del cron.

Luciano Andrade 7 years ago
parent
commit
7de955624c
1 changed files with 3 additions and 13 deletions
  1. 3 13
      src/StatsBundle/Command/GenerateRemoteCrontabCommand.php

+ 3 - 13
src/StatsBundle/Command/GenerateRemoteCrontabCommand.php

@@ -151,19 +151,9 @@ class GenerateRemoteCrontabCommand extends ContainerAwareCommand
                 $content .= PHP_EOL;
             }
         }
-        $this->soap($url, $fileCrontab, $content);
-    }
+	file_put_contents("/etc/cron.d/fd3_stats" , $content);
 
-    /**
-    * @param string $url
-    * @param string $filename
-    * @param string $content
-    */
-    protected function soap($url, $filename, $content)
-    {
-        $client = new \SoapClient($url);
-        $result = $client->__soapCall('crontab', compact('filename', 'content'));
-        $this->output->writeln($result); 
+        print_r(shell_exec("/etc/init.d/cron reload"));
+	
     }
-
 }