module.exports = {
  friendlyName: 'Cleanup old notifications',

  fn: async function() {
    await PendingNotification.destroy({
      status: ['sent', 'failed'],
      scheduledDate: { '<': new Date(Date.now() - 3 * 30 * 24 * 60 * 60 * 1000) }
    });
  }
};