# Rerun temporal cron job

**URL:** <https://community.temporal.io/t/rerun-temporal-cron-job/6681>\
**Category:** Community Support\
**Tags:** general-impl\
**Created:** [December 7, 2022, 7:04pm UTC](https://community.temporal.io/t/rerun-temporal-cron-job/6681 "2022-12-07T19:04:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anton-nomo](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@Anton-nomo](https://community.temporal.io/u/Anton-nomo)\
**Post date:** [December 7, 2022, 7:04pm UTC](https://community.temporal.io/t/rerun-temporal-cron-job/6681/1 "2022-12-07T19:04:11Z")

</div>

Hi team.

We are facing a problem in that we can’t rerun our cron job workflows with new changes.

2022-12-07T13:25:26.945Z [worker] info: Workflow execution already started  
2022-12-07T13:25:26.957Z [worker] info: Workflow execution already started  
2022-12-07T13:25:26.971Z [worker] info: Workflow execution already started

Every time when we deploy our changes to temporal we run the start script. Where we are running our worker and then start the cron job workflows.

```auto
  const handle = await client.start('workflowName', {
    args: [currencyCode],
    taskQueue: 'TaskQueue',
    workflowId: workflowIdPrefix + currencyCode,
    cronSchedule: `${minute} * * * *`,
  });

  workerLogger.info(`workflow ${handle.workflowId} started`);

```

We try to **cancel** running workflows and run them one more time. But facing the same issue. Temporal cancel existing workflows and can’t run a new one. Do we have any idea how to rerun the temporal cron job?

```auto
async function terminateWorkflow(currencyCode: CurrencyCode) {
  const client = await getWorkflowClient();
  const handle = client.getHandle(workflowIdPrefix + currencyCode);

  try {
    await handle.cancel();

    workerLogger.info(`workflow ${handle.workflowId} terminated`);
  } catch {
    workerLogger.info(
      `workflow ${handle.workflowId} execution already completed`
    );
  }
}

```

---

<div class="post-metadata">

**Author:** ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)\
**Post date:** [December 7, 2022, 7:28pm UTC](https://community.temporal.io/t/rerun-temporal-cron-job/6681/3 "2022-12-07T19:28:57Z")

</div>

> await handle.cancel();

With cron, think this should be

`await handle.terminate(reason);`

To stop a current cron execution you have to either terminate it, or set workflow execution timeout in worker options that would stop it when this timer is triggered.
