0

I'm writing Swift script and want to run it automatically. For example, I want my script to clean Downloads folder every week or on schedule. How I can do it?

Artem Novichkov
  • 2,356
  • 2
  • 24
  • 34

1 Answers1

0

First you have to be able to run swift from terminal, see here Then you can create an cron task to execute it periodically.

(But I think Swift is not a good choice for this kind of job)

Community
  • 1
  • 1
Maxime
  • 1,332
  • 1
  • 15
  • 43