-- A generic SQL to "complete" all currently running reports. Use this
-- to clean up dead reports. This is best run when the reporter is not
-- running.
UPDATE reporter.schedule
SET complete_time = NOW(),
    error_code = 1,
    error_text = 'report failed - please open a Helpdesk ticket for assistance'
WHERE id IN (SELECT id FROM reporter.currently_running);
