--- displayed_sidebar: entitiesSidebar slug: /references/entities/classes/BatchJob --- import TypeList from "@site/src/components/TypeList" # BatchJob A Batch Job indicates an asynchronus task stored in the Medusa backend. Its status determines whether it has been executed or not. ## Properties `","description":"An optional key-value map with additional details","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"context","type":"`Record`","description":"The context of the batch job, the type of the batch job determines what the context should contain.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"result","type":"`object` & `Record`","description":"The result of the batch job.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"count","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"advancement_count","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"progress","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"errors","type":"(`string` \\| [BatchJobResultError](../../medusa/types/medusa.BatchJobResultError.mdx))[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"stat_descriptors","type":"[BatchJobResultStatDescriptor](../../medusa/types/medusa.BatchJobResultStatDescriptor.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"file_key","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"file_size","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"dry_run","type":"`boolean`","description":"Specify if the job must apply the modifications or not.","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"status","type":"[BatchJobStatus](../../medusa/enums/medusa.BatchJobStatus.mdx)","description":"The status of the batch job.","optional":false,"defaultValue":"created","expandable":false,"children":[{"name":"CREATED","type":"`\"created\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PRE_PROCESSED","type":"`\"pre_processed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"CONFIRMED","type":"`\"confirmed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PROCESSING","type":"`\"processing\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"COMPLETED","type":"`\"completed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"CANCELED","type":"`\"canceled\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"FAILED","type":"`\"failed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"pre_processed_at","type":"`Date`","description":"The date from which the job has been pre-processed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"processing_at","type":"`Date`","description":"The date the job is processing at.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"confirmed_at","type":"`Date`","description":"The date when the confirmation has been done.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`Date`","description":"The date of the completion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`Date`","description":"The date of the concellation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"failed_at","type":"`Date`","description":"The date when the job failed.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="BatchJob"/>