Skip to content

Commit

Permalink
add note to cron generated with the currrent user
Browse files Browse the repository at this point in the history
  • Loading branch information
dinossaur23 committed Oct 20, 2019
1 parent d1a985d commit e0851c4
Showing 1 changed file with 5 additions and 1 deletion.
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 e0851c4

Please sign in to comment.