'how to configure cron as jenkins string parameter for AWS Lamda

I have an AWS Lambda function which is running once everyday through a cron defined in my CloudFormation.yaml. The current cron is written as below.

Events:
StartScheduledEvent:
    Type: Schedule
    Properties:
       Schedule: cron (0 8? * MON-FRI *)

Is there any way to move the cron to jenkins string parameter so that code changes wont be required while changing cron duration.

I can change the cron through console but my organization does allow not changing anything through Console but only CI/CD.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source