'crontab settings are changed after instance refresh in AWS auto scaling group

I'm changing an instance crontab settings, then creating an AMI and configuring a launch template in auto scaling group to use the newly created AMI (a new version).

After making Instance refresh for Auto Scaling group the crontab changes which I did befor image creation disappears.

Please help me to solve the problem.



Sources

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

Source: Stack Overflow

Solution Source