Skip to content

Commit

Permalink
Regenerate documentation with docgen
Browse files Browse the repository at this point in the history
  • Loading branch information
jkarwasz-portavice committed Dec 21, 2023
1 parent 98426fa commit 6ac252e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion contrib/crontab.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
return get('application', 'application');
});

// Use sudo to run crontab
// Use sudo to run crontab. When running crontab with sudo, you can use the `-u` parameter to change a crontab for a different user.
set('crontab:use_sudo', false);

desc('Sync crontab jobs');
Expand Down
26 changes: 10 additions & 16 deletions docs/contrib/crontab.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,38 +21,32 @@ Get path to bin
return which('crontab');
```

### crontab:use_sudo

Runs crontab as sudo.
### crontab:identifier
[Source](https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L33)

Set the identifier used in the crontab, application name by default

```php title="Default value"
false
return get('application', 'application');
```

When running crontab with sudo, you can use the `-u` parameter to change a crontab for a different user.

```php title="Example usage"
set('crontab:use_sudo', true);
set('bin/crontab', function () {
return which('crontab') . ' -u www-data';
});
```

### crontab:identifier
[Source](https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L33)
### crontab:use_sudo
[Source](https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L38)

Set the identifier used in the crontab, application name by default
Use sudo to run crontab. When running crontab with sudo, you can use the `-u` parameter to change a crontab for a different user.

```php title="Default value"
return get('application', 'application');
false
```



## Tasks

### crontab:sync
[Source](https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L38)
[Source](https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L41)

Sync crontab jobs.

Expand Down

0 comments on commit 6ac252e

Please sign in to comment.