Cron job creating files each time it runs

Cron job creating files each time it runs



I have a cron job that runs the script every 30 minutes. The problem is each time it runs the cron it creates a file in the root directory. It'll create files like this:


wp-cron.php?doing_wp_cron.1
wp-cron.php?doing_wp_cron.2
wp-cron.php?doing_wp_cron.3



This is my cron:


*/30 * * * * wget http://yourdomain.com/wp-cron.php?doing_wp_cron 2>&1 > /dev/null



How can I make it auto delete after it finishes running the cron job or make it not create the file?




1 Answer
1



wget primarily is for downloading files, it might be better to use curl


curl



curl http://yourdomain.com/wp-cron.php?doing_wp_cron


curl http://yourdomain.com/wp-cron.php?doing_wp_cron



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)