Commit Graph

61 Commits

Author SHA1 Message Date
John Bintz
905558da45 check instead to see if stdin is not a tty for triggering pipe 2011-09-06 09:30:12 -04:00
John Bintz
919dbe09ef allow piping of crontab from stdin to stdout 2011-08-19 11:40:23 -04:00
Michał Szajbe
439a13644c run rake through bundler if possible 2011-07-19 10:19:13 +02:00
Michał Szajbe
b405def424 encapsulate rails 3 check for easier testing 2011-07-19 10:18:33 +02:00
Javan Makhmali
cc6bafb37a allow comma in raw cron syntax 2011-05-23 22:23:42 -04:00
Javan Makhmali
1654f67774 convert most shortcuts to seconds 2011-05-23 21:08:43 -04:00
Javan Makhmali
6305ab0d8e removed -i from default job_template 2011-03-23 22:03:43 -04:00
Javan Makhmali
a94dda4b8b allow raw cron sytanx 2011-03-06 17:31:17 -05:00
Javan Makhmali
4b98f064eb add -i to the bash job template 2011-03-06 16:17:36 -05:00
Javan Makhmali
006a1d963b Merge branch 'master' of https://github.com/teejayvanslyke/whenever into teejayvanslyke-master 2011-03-06 16:11:49 -05:00
teejayvanslyke
fe022bb1c6 Setting nil or blank environment variables now properly formats output
as ENVVAR="" instead of ENVVAR=.
2010-12-07 10:12:08 -08:00
Rich Meyers
d0a7a8600e Test for issue #95 - terminating newlines should be preserved when updating crontab files 2010-11-02 12:32:45 -04:00
Rich Meyers
c4abbefe00 Preserve whitespace at the end of crontab contents (issue #95) 2010-11-01 17:07:09 -04:00
Javan Makhmali
9f73bcb469 set environment and path earlier so schedule files do conditionals with them 2010-10-25 21:14:45 -04:00
Javan Makhmali
20faaa266d Don't leave Whenever comments when clearing 2010-10-25 21:03:49 -04:00
Javan Makhmali
e66226e3ae created a new :job_template to wrap all commands with. using 'bash -l -c' by default now to load the entire enviroment which should help with RVM issues. 2010-10-20 17:12:00 -04:00
Javan Makhmali
2effe0b32d fixed conflict 2010-10-19 17:50:40 -04:00
Javan Makhmali
ff0d68af55 don't worry about preserving the Rails 2 runner job_type if this is a Rails 3 app 2010-10-19 17:37:10 -04:00
Javan Makhmali
953987c6b2 moved output redirection to the Job class and subing it in from the job templates 2010-10-19 13:53:41 -04:00
Javan Makhmali
0055c36aef runners for Rails 3 2010-10-18 12:08:28 -04:00
Javan Makhmali
e7e4a37b3a drop /usr/bin/env from rake job - let PATH do the work. added --silent flag to rake job tosupress the 'in directory' message. 2010-10-18 10:41:00 -04:00
Javan Makhmali
9c96e7c16b Fixed regex related bugs. Release v0.5.3 2010-09-24 13:41:05 -04:00
Peer Allan
3e20f936eb Added --cut option to the command line to allow pruning of the crontab 2010-09-10 09:32:48 +08:00
Javan Makhmali
f17c8d8cd2 consolidated tests - moving away from testing on runners, rakes, etc. now that jobs are definable. added more units tests for Jobs. 2010-09-06 23:38:11 -04:00
Javan Makhmali
27827c8e17 Cleaned up requirements, paths, test structure 2010-09-06 13:18:39 -04:00
Jay Adkisson
dd15137e41 escape quotes for bash, furrealz this time
Any parameter in a job type template which is surrounded by quotes
will now be auto-escaped.

Examples:

job_type :foo, :template => "/my/cool/bin ':bar'"

every :day do
  foo %(single quote! -> ' <-)
end

will render to

@daily /my/cool/bin 'single quote! -> '\'' <-'
2010-07-03 22:55:32 +08:00
Javan Makhmali
505a0b4075 attempting to escape quotes 2010-07-02 17:39:17 -04:00
Javan Makhmali
e12d3436d6 automatically escape :task in single or double quotes 2010-07-01 17:04:11 -04:00
Michael Raidel
8faf291369 clear the crontab 2010-06-29 03:25:04 +08:00
Gerrit Riessen
087119ce2d Allow the specification of an offset (using :at => [1-59]) when using
every( X.minutes ) { ... } for job definition. For example:

 every 5.minutes, :at => 1 do
          command "blahblah"
 end

produces

 1,6,11,16,21,26,31,36,41,46,51,56 * * * * blahblah
2010-06-29 03:20:32 +08:00
Javan Makhmali
f31148d27d adds user definable job types and uses the new API for these to define the original command, runner, and rake commands 2010-06-28 15:14:01 -04:00
Damien
b664c037e4 Handle job_type settings more gracefully and allow quoting of the task to be supressed 2010-06-11 23:31:09 +08:00
Damien
7e6a199b8b Writing some tests for user defined jobs and changing job.environment option to job.no_environment so it plays nicely with the environment settings from the parent class 2010-06-11 23:31:09 +08:00
tma
1069cb7c48 fix STDERR output redirection to file to append instead of overwrite. 2010-04-26 22:56:38 +08:00
Michael Guterl
cd92f1f4f1 In order to use bundler you must change to the directory where Gemfile exists
* Change runner command to cd to directory prior to running script/runner
2010-04-26 22:41:09 +08:00
Javan Makhmali
6ba4a237ed fixed test by using unambiguous month 2009-11-30 14:34:58 -05:00
Javan Makhmali
295cabe56c added new output redirection features, moved most of it into a new class. 2009-10-20 11:52:09 -04:00
Peer Allan
be38dd1139 Added output redirection support
* replaced cron_log option with output
  * setting output to nil explicitly redirects to /dev/null
  * updated Readme and wheneverize template with examples
2009-10-18 06:49:16 +08:00
Javan Makhmali
6bf363b723 don't try to combine @shortcut jobs 2009-09-04 16:48:33 -04:00
Javan Makhmali
51a6b3720a Sets the PATH automatically unless it's already provided or told not to. 2009-07-15 15:37:03 -04:00
Javan Makhmali
8d3b02861a Merge branch 'new_line_after_closing_comment' 2009-07-13 22:24:10 -04:00
Javan Makhmali
434423f22d Adds new line after closing Whenever comment. Prevents accumulation of new lines with each --update-crontab. Closes #18 2009-07-13 17:23:58 -04:00
Javan Makhmali
e2c30ca299 Added failing test to show problem with #combine method when two commands are in one every statement 2009-07-13 16:24:23 -04:00
Javan Makhmali
c8c87406f5 Added aligned time tests for runners and rake tasks 2009-07-13 15:43:08 -04:00
Javan Makhmali
2ab3c26f9e Added test for crazy combo of every's and at's 2009-07-13 15:40:02 -04:00
Javan Makhmali
0dff0eb087 cleaned up formatting and wording of tests 2009-07-13 15:17:26 -04:00
Sam Ruby
92e727c09e Fixed a bug involving double quotes and runner
Signed-off-by: Javan Makhmali <javan@javan.us>
2009-07-14 03:06:04 +08:00
Javan Makhmali
c2272dd3ec updated test to check for days using numbers (1-7) instead of strings (mon,wed,tue) 2009-07-01 00:36:06 -04:00
Sam Ruby
5ffc2b48bd Allow multiple times, arrays, and combine results whenever possible
Signed-off-by: Javan Makhmali <javan@javan.us>
2009-07-01 09:08:26 +08:00
Sam Ruby
abab2f8835 Allow multiple ":at" times, separated by commas
Signed-off-by: Javan Makhmali <javan@javan.us>
2009-07-01 09:00:58 +08:00