Skip to content

Commit

Permalink
Merge pull request #788 from dinossaur23/master
Browse files Browse the repository at this point in the history
Add note in README that cron is generated with the current user
  • Loading branch information
benlangfeld committed Nov 12, 2019
2 parents d1a985d + 25aebf7 commit b205bcd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### unreleased

* Add note in README that cron is generated with the current user. [Raquel Queiroz]

### 1.0.0 / Jun 13, 2019

* First stable release per SemVer.
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ This will create an initial `config/schedule.rb` file for you (as long as the co

### The `whenever` command

The `whenever` command will simply show you your `schedule.rb` file converted to cron syntax. It does not read or write your crontab file.

```sh
$ cd /apps/my-great-project
$ bundle exec whenever
```

This will simply show you your `schedule.rb` file converted to cron syntax. It does not read or write your crontab file; you'll need to do this in order for your jobs to execute:
To write your crontab file for your jobs, execute this command:

```sh
$ whenever --update-crontab
Expand All @@ -41,6 +43,8 @@ $ whenever --load-file config/my_schedule.rb # set the schedule file
$ whenever --crontab-command 'sudo crontab' # override the crontab command
```

> Note: If you run the whenever --update-crontab without passing the --user attribute, cron will be generated by the current user. This mean tasks that needs other user permission will fail.
You can list installed cron jobs using `crontab -l`.

Run `whenever --help` for a complete list of options for selecting the schedule to use, setting variables in the schedule, etc.
Expand Down

0 comments on commit b205bcd

Please sign in to comment.