<commit_before># Croney

## Usage

Croney uses ZooKeeper to acquire a distributed lock, ensuring only a single process will execute a task. The task is executed according to the specified cron expression.

For example, to run `echo 'hello, world'` every second (on a single machine) you can run as follows:

```
$ croney --lockPath=/some/path --schedule="* * * * *" --command="/usr/bin/env echo 'hello, world'"
```

`lockPath` is used to uniquely identify the task: it should be set to the same value across all machines that would attempt to execute the same command; only a single machine (from those specifying the same lock path) will execute the command.

## Rationale
Occasionally you want to run tasks that need to execute on a schedule. Like cron ;-)

However, doing this on an unknown set of machines is a little more difficult if you want only one instance of the task to execute. Normally one machine is the special one: tasked as the scheduler, worker etc. This could be through running a single stable instance, or providing metadata (if running in a cloud environment) for a single machine; both situations require manual intervention and control to ensure the machine is available. In [adrianco](https://twitter.com/adrianco) parlance we must treat the host as a pet rather than cattle.

Croney solves the problem generally: allowing a command to be executed on a regular cron schedule but self-coordinating with other machines to ensure only a single task is run. It provides single-execution cron on cattle.

## License

BSD 3-clause. Please see `LICENSE`.
<commit_msg>update README with notes on govendor<commit_after># Croney

## Usage

Croney uses ZooKeeper to acquire a distributed lock, ensuring only a single process will execute a task. The task is executed according to the specified cron expression.

For example, to run `echo 'hello, world'` every second (on a single machine) you can run as follows:

```
$ croney --lockPath=/some/path --schedule="* * * * *" --command="/usr/bin/env echo 'hello, world'"
```

`lockPath` is used to uniquely identify the task: it should be set to the same value across all machines that would attempt to execute the same command; only a single machine (from those specifying the same lock path) will execute the command.

## Rationale
Occasionally you want to run tasks that need to execute on a schedule. Like cron ;-)

However, doing this on an unknown set of machines is a little more difficult if you want only one instance of the task to execute. Normally one machine is the special one: tasked as the scheduler, worker etc. This could be through running a single stable instance, or providing metadata (if running in a cloud environment) for a single machine; both situations require manual intervention and control to ensure the machine is available. In [adrianco](https://twitter.com/adrianco) parlance we must treat the host as a pet rather than cattle.

Croney solves the problem generally: allowing a command to be executed on a regular cron schedule but self-coordinating with other machines to ensure only a single task is run. It provides single-execution cron on cattle.

## Building

`Croney` dependencies were managed using [Govendor](https://github.com/kardianos/govendor). You can specify `GO15VENDOREXPERIMENT=1` to pull dependencies from the `./vendor` directory.

## License

BSD 3-clause. Please see `LICENSE`.

{'fraction_non_alphanumeric': 0.063347083087802, 'fraction_numerical': 0.0014731879787860931, 'mean_word_length': 4.458199356913183, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3124058', 'n_tokens_mistral': 856, 'n_tokens_neox': 817, 'n_words': 505}