Wordpress TMP Full


Almost every day I get this type of error:

WordPress database error Disk full (/tmp/#sql_2bf_0.MAI); waiting for someone to free some space... 

How can I create a cron job to clean the /tmp/ daily?
This is super frustating.

Clean the tmp directory using
rm -rf /tmp/*
after running this must reboot server once

I already do this, but I want to automatize. It’s possible?

Change MySQL temp path as database server creating temp files there and it’s small in size.

Check this and follow my suggestions to see if this helps. This is what works for me.

Read through the thread for my comments.