This function doesn't working from lauch cronjob... but if you manually run the script it works... why If is it the security reason ?