cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

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

file reaper implementation

ravila
1-Visitor

file reaper implementation

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

6 REPLIES 6

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:

  • ListFiles
  • DeleteFile

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?

ravila
1-Visitor
(To:ravila)

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.

ravila
1-Visitor
(To:ravila)

elegant, thanks.

Announcements


Top Tags