cron added
This commit is contained in:
parent
0bb0f006d1
commit
8c91b846a7
30
lib.cf
30
lib.cf
|
@ -408,3 +408,33 @@ files:
|
|||
classes => results("namespace","etc_hosts");
|
||||
}
|
||||
|
||||
|
||||
bundle agent cron
|
||||
{
|
||||
vars:
|
||||
"cron_d" string => "/etc/cron.d";
|
||||
freebsd::
|
||||
"cron_d" string => "/usr/local/etc/cron.d";
|
||||
files:
|
||||
"$(cron_d)/."
|
||||
create => "true",
|
||||
handle => "cron_d_created";
|
||||
|
||||
}
|
||||
|
||||
bundle agent create_cron_job(name,time,command)
|
||||
{
|
||||
methods:
|
||||
"any" usebundle => cron;
|
||||
files:
|
||||
"$(cron.cron_d)/$(name)"
|
||||
create => "true",
|
||||
content => "#
|
||||
# Managed by CFEngin
|
||||
#
|
||||
|
||||
$(time) $(command)
|
||||
",
|
||||
depends_on => {"cron_d_created"};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue