"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const cron_1=__importDefault(require("@b/cron"));exports.metadata={summary:"Run the cron job",operationId:"runCron",tags:["Admin","Cron"],description:"Runs the cron job to process pending tasks.",responses:{200:{description:"Cron job run successfully",content:{"application/json":{schema:{type:"object",properties:{message:{type:"string",description:"Success message"}}}}}},400:{description:"Error running cron job",content:{"application/json":{schema:{type:"object",properties:{message:{type:"string",description:"Error message"}}}}}}},permission:"view.cron",logModule:"ADMIN_SYSTEM",logTitle:"Get Cron Jobs"};exports.default=async e=>{const{ctx:t}=e;null==t||t.step("Fetching cron jobs");const s=await cron_1.default.getInstance(),o=await s.getCronJobs();null==t||t.success("Cron jobs retrieved successfully");return o};