Since there are some scenarios where avatars can be stored in the avatars folder without the user being registered successfully, it is a good idea to clean the avatars folder periodically, so unused avatars are removed automatically.
Requirements:
- Schedule the job to 24 hours
- The cron job should be activated by default, but since it applies a heavy-resources task, instance administrators should be able to deactivate it using an environment variable
For further reference about creating cron jobs, check out the Spring documentation.
Since there are some scenarios where avatars can be stored in the avatars folder without the user being registered successfully, it is a good idea to clean the avatars folder periodically, so unused avatars are removed automatically.
Requirements:
For further reference about creating cron jobs, check out the Spring documentation.