Edit marketcleaner.lua as below and try:
function onStartup()
local result = db.getResult("SELECT `id`, `player`, `item_id`, `item_name`, `count`, `cost`, `date` FROM `auction_system` ORDER by `date` ASC;")
local days = 30*3600*24
local nowtime = os.date('*t')
if (result and...