mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-12-04 19:03:17 +00:00
Document crontab support
This commit is contained in:
parent
e94edac51e
commit
c5514e0451
@ -3,6 +3,7 @@
|
||||
add: support for tunnel commands
|
||||
add: support for batchSizeLimit
|
||||
add: -onepass option
|
||||
add: crontab support
|
||||
change: support relative executable paths
|
||||
|
||||
2018-03-09: 2.2.3
|
||||
|
@ -40,6 +40,7 @@ Following settings are shared between all defaults:
|
||||
| Name | Description |
|
||||
|-----------------|------------------|
|
||||
| source | Source directory |
|
||||
| crontab | See section `Periodic Full-Sync`|
|
||||
|
||||
|
||||
|
||||
@ -694,3 +695,34 @@ Once the tunnel is UP, a full transfer is initiated. Subsequent transfers are th
|
||||
|
||||
* Pool mode only works with `rsync` backend, since there is no way to prevent multiple transfers to the same file in a relieable way, the rsync backend only supports `maxProcesses = 1` which renders pool mode useless. Since the remote side rsync daemon can prevent file trashing, the rsync backend is safe.
|
||||
|
||||
|
||||
## Periodic Full-Sync
|
||||
|
||||
*New in: 2.3.0*
|
||||
|
||||
It is possible to trigger a full sync command from within lsync with the crontab feature. This requires that [lua-crontab](https://github.com/logiceditor-com/lua-crontab) is installed on the system. The crontab configuration accepts a list of `crontab` patterns to which a full sync will be triggered.
|
||||
|
||||
```lua
|
||||
sync {
|
||||
...
|
||||
crontab = {
|
||||
-- does a full sync once a day at 3:00:01
|
||||
"1 0 3 * * *",
|
||||
},
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
### Field destination
|
||||
|
||||
Each field is seperated by `" "` and can contain multiple values seperated by `,`.
|
||||
|
||||
| FIELD | VALUES | SPECIAL CHARACTERS |
|
||||
|--------------|-----------------|--------------------|
|
||||
| Seconds | 0-59 | , - * |
|
||||
| Minutes | 0-59 | , - * |
|
||||
| Hours | 0-23 | , - * |
|
||||
| Day of month | 1-31 | , - * |
|
||||
| Month | 1-12 or JAN-DEC | , - * |
|
||||
| Day of week | 0-6 or SUN-SAT | , - * |
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user