Can I make a daily format to a SMB Share?

Aaaarafiquem

Cadet
Joined
Feb 23, 2020
Messages
2
Hello!
I'm a newbie on FreeNAS and I have a question.
I have to do a job in which they ask me for a shared resource that is deleted every day.
I have the share ready and functional, but I don't know how I could have its content removed every day automatically.
Anyone who knows how or have any ideas? (Sorry for my bad english and thanks in advance)
 
Joined
Jan 4, 2014
Messages
1,644
What about a cron job that runs daily to delete the contents of a location using the find command? For example, find <location of shared resource> -atime +1 -delete will delete content at the location that is more than a day old. I'd carefully test this out by deleting a single file at the location before attempting a wildcard delete just in case you get the path to the shared resource wrong.
 
Top