would you teach me how to create this cronjob. the command line to create this automation
Please follow the below steps for running the cronjob clear cache:
Step 1: Open your terminal with your project root directory
Step 2: Now you will run the below command in project root directory:
$ crontab -e
After edit your crontab save and close the crontab for now (CTRL + X, CTRL + Y, then ENTER if you selected nano).
Step 3. Now check your view the contents of your crontab, but not edit it, you can use the following command:
$ crontab -l
Step 4: Now check the setup is correct or not, so you will run the showing file path command till end in your crontab terminal check the below screenshot:
If you are not showing like this, so you will followed the below steps:
Go to the project root directory with you want to delete the folder path, and check the current directory of your project folder, run the below command:
It will show the current project file path.
Once again check this is working or not, please follow the above 4 step again. You will run the showing file path command till end in your crontab terminal.
Now your crontab is saved, and project folder removed in every 2 days.
Also, you can check the below links for more information: