Skip to content

Commit 06c49ab

Browse files
authored
Update README.md (#27)
Improve README.md add CRONTAB example
1 parent b159aff commit 06c49ab

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ $rotation = new Rotation([
5656
$rotation->rotate('file.log');
5757
```
5858

59+
## Example: Using with crontab
60+
61+
To automatically rotate your logs every day at 12:01 AM, add the following line to your crontab:
62+
63+
```crontab
64+
1 0 * * * /usr/bin/php /path/to/your/log-rotation-script.php
65+
```
66+
67+
5968
## Test
6069

6170
Run test with:

0 commit comments

Comments
 (0)