Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
I need to implement a file reaper on my linux thingworx platform.
for example, files that live under /ThingworxStorage/repository/SystemRepository
that are older that 2 weeks need to be removed.
what are ways about going about that? I don't think it's feasable to
do that from each ems that runs and connects to the platform ( mashup location )
ideas?
thanks
If it's a folder on a TW server system repository, just create a Timer Thing that triggers for instance once a day and deletes old files.
ok, i figured out the timer and looked at a scheduler too.
i cannot figure our from the subscription or service features how to call
a bash script without going through php - that seems sloppy.
how can i invoke a bash script direct from a subscription or service to do the job of file clean up?
if that is the wrong way to do it, how can i query the file repository and remove files within a given date range?
You can delete and list files through FileRepository Services:
You don't need to use a bash script neither a external php, all done through standard TW features.
can you provide me with a syntax example of calling FileRepository Services Listfiles,
or where to look for the api?
never mind, i was able to stumble threw it enough, using errors from the application log to figure it out.
kind of backwards engineering, but it now works. thank you again.
elegant, thanks.