Is it possible to manually clear Workflow Static Data?

I just started using the docker image of n8n and I was wondering if you can manually clear Workflow Static Data? I have created a Cron Job Workflow but since the data persists even after editing the Workflow once its Active I am experiencing some roadblocks with what I am trying to do. Currently I just made do with using Write File to create a temporary file of my data but its not as efficient as using Static Data. Hope someone can enlighten me on how one can clear the values of Workflow Static Data.

Welcome to the community @hiiro

I’ve never tried it, but I think you can clear it from a function node.

// Get the global workflow static data
const staticData = getWorkflowStaticData('global');
// Update its data
staticData.lastExecution = new Date().getTime();
// Delete data
delete staticData.lastExecution;

return [
  {
    json: {}
  }
]
 

@RicardoE105 thanks it seems to have worked. While the Workflow was still Active I create a Function similar to yours and tried to delete the static data I set by pointing the Cron node to the Function for deleting the static data. After waiting for the Cron job to finish a new execution I then pointed the Cron node back to my original Workflow and sure enough it worked as if the static data was not set. Thank you again for answering my inquiry.

Good to hear that it worked. Have fun.