Follow

Just set up a cronjob to automatically delete remote assets more than 7 days old on this instance!

Feels silly, "cron" was just a thing I knew about and was kind of scared to set it up because of the effort it takes to learn something new. Turns out it was super easy to run a daily process!

· · Web · 2 · 0 · 14

@somnius huu what are remote assets? I hope it’s not all the images people are posting?

@thomasorus Ah, "remote assets" refer to images from external instances hosted on our instance. No one's assets on Merveilles are being deleted!

We need to remove remotes every once in a while because it takes up a LOT of space if we just host everything from everywhere forever. Federation is… weird. X3

@somnius oooh i see ! And yes cron tasks look frightening until you do one and realize it’s just editing a text file.

@somnius Pro tip: every time the job runs it'll generate an email using the server's default mail transfer agent. I usually set up jobs with the "cronic" package so that they only email on failure. You can also send the output to a log file, which can be easier to manage.

Sign in to participate in the conversation
Merveilles

Merveilles is a community project aimed at the establishment of new ways of speaking, seeing and organizing information — A culture that seeks augmentation through the arts of engineering and design. A warm welcome to any like-minded people who feel these ideals resonate with them.