Skip to content

Add support for run only once #227

@dadoonet

Description

@dadoonet

Sometimes you would like to control externally (using a crontab) for example, how often you want to scan an index a hard drive.
Also, you might want to do it only once so you don't need to "watch" for changes.

In such a case, waiting for a message in logs is far from being ideal.

Let's add a new option loop which defines the number of runs we want before exiting:

  • X where X is a negative value means infinite, like -1 (default)
  • 0 means that we don't run FSCrawler. Well... Not sure what could be the usage. May be checking that the configuration file is correct?
  • X where X is a positive value is the number of runs before it stops.

If you want to scan your hard drive only once, run with --loop 1.

Based on #223 (comment)

Metadata

Metadata

Assignees

Labels

newFor new features or options

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions