[chef] Re: Re: Re: Re: cron


Chronological Thread 
  • From: Mike < >
  • To: " " < >
  • Subject: [chef] Re: Re: Re: Re: cron
  • Date: Wed, 4 Sep 2013 15:13:30 -0400

A more complete example, using the `cron` cookbook [1]:

my_cookbook/recipes/somecron.rb:

include_recipe 'cron'

cookbook_file '/tmp/my_special_script.sh' do
  mode 00755
end

cron_d 'run_my_special_script' do
  minute 0
  hour 22
  command "/tmp/my_special_script.sh"
  user "appuser"
end


You could also deploy a straight cron file into /etc/cron.d/<my file>, but I prefer the cron cookbook and the resource it provides.


-M




On Wed, Sep 4, 2013 at 3:01 PM, Morgan Blackthorne < " target="_blank"> > wrote:
cookbook_file is a native Chef resource: http://docs.opscode.com/resource_cookbook_file.html

--
~*~ StormeRider ~*~

"Every world needs its heroes [...] They inspire us to be better than we are. And they protect from the darkness that's just around the corner."

(from Smallville Season 6x1: "Zod")

On why I hate the phrase "that's so lame"... http://bit.ly/Ps3uSS


On Wed, Sep 4, 2013 at 11:57 AM, Nikhil Shah < " target="_blank"> > wrote:
I am not sure what you mean by that. Do I have to use another cookbook? Would you be able to provide an example?
Nikhil Shah  System Administrator

The Orchard® / www.theorchard.com

23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com
Facebook / @orchtweets

Privileged And Confidential Communication.
This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.
 

On Sep 4, 2013, at 2:54 PM, Morgan Blackthorne < " target="_blank"> > wrote:

You would use a cookbook_file resource for that (or template, or remote_file). The cron resource only handles the cron scheduling side of things.

--
~*~ StormeRider ~*~

"Every world needs its heroes [...] They inspire us to be better than we are. And they protect from the darkness that's just around the corner."

(from Smallville Season 6x1: "Zod")

On why I hate the phrase "that's so lame"... http://bit.ly/Ps3uSS


On Wed, Sep 4, 2013 at 11:49 AM, Nikhil Shah < " target="_blank"> > wrote:
I am trying to use the cron cookbook. I am unsure how to specify a file to upload to the server and to run that script within the cron job.




--
Nikhil Shah / System Administrator

nshah@theorchard.com


The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com

Facebook / @orchtweets


Privileged And Confidential Communication.

This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited







Archive powered by MHonArc 2.6.16.

§