Creating node when cron runs
So I got my answer by myself: I ran clear cache and it performs everything perfectly. @Andrew Morris: I haven't used Rules before but I think it can't be performed by that. The generate function creates 2 xls files via PHPExcel and gets all files uploaded by user in a period of time. Then it compresses all the files into a zip archive via ZipArchive and saves the data for the zip file. Then it returns the fid of the saved file.