You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,12 +23,14 @@ This will create an initial `config/schedule.rb` file for you (as long as the co
23
23
24
24
### The `whenever` command
25
25
26
+
The `whenever` command will simply show you your `schedule.rb` file converted to cron syntax. It does not read or write your crontab file.
27
+
26
28
```sh
27
29
$ cd /apps/my-great-project
28
30
$ bundle exec whenever
29
31
```
30
32
31
-
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:
33
+
To write your crontab filefor your jobs, execute this command:
32
34
33
35
```sh
34
36
$ whenever --update-crontab
@@ -41,6 +43,8 @@ $ whenever --load-file config/my_schedule.rb # set the schedule file
41
43
$ whenever --crontab-command 'sudo crontab'# override the crontab command
42
44
```
43
45
46
+
> 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.
47
+
44
48
You can list installed cron jobs using `crontab -l`.
45
49
46
50
Run `whenever --help` for a complete list of options for selecting the schedule to use, setting variables in the schedule, etc.
0 commit comments