Using the following lines of codes, you will be able to delete trash automatically on daily basis.

Note: Make sure that you do replace 1 by X to empty spam comments automatically every X days.