I want to add successive crons via puppet, first one to set as each 10 minutes, and the 2nd one to run in Sunday 7:00PM.
The first cron in puppet is working properly, but the 2nd one shows the below error: "Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid relationship: Cron[notifyinactivetargetweekly] { require => File[...notifyinactivetargetweekly.sh] }, because File[...notifyinactivetargetweekly.sh] doesn't seem to be in the catalog Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run"
Below are the manifest code.
cron { 'firstcronsync':
command => "${scmdemophp::DocRootDir}/firstcronsync.sh ${scmdemophp::Environment} ${scmdemophp::DocRootDir}",
require => File["${scmdemophp::DocRootDir}/firstcronsync.sh"],
minute => '*/10',
environment=>["COMPOSER_HOME=${scmdemophp::DocRootDir}",
"SYMFONY_ENV=${scmdemophp::Environment}",
"SYMFONY_DEBUG=${scmdemophp::Debug}",
"PATH=/opt/rh/php55/root/usr/bin:/opt/rh/php55/root/usr/sbin:/usr/local/sbin:/usr/local/bin:/sbin/:/bin/:/usr/sbin/:/usr/bin/"
],
}->
cron { 'notifyinactivetargetweekly':
command => "${scmdemophp::DocRootDir}/notifyinactivetargetweekly.sh ${scmdemophp::Environment} ${scmdemophp::DocRootDir}",
require => File["${scmdemophp::DocRootDir}/notifyinactivetargetweekly.sh"],
minute => '00',
hour => '19',
weekday => 'Sunday',
environment=>["COMPOSER_HOME=${scmdemophp::DocRootDir}",
"SYMFONY_ENV=${scmdemophp::Environment}",
"SYMFONY_DEBUG=${scmdemophp::Debug}",
"PATH=/opt/rh/php55/root/usr/bin:/opt/rh/php55/root/usr/sbin:/usr/local/sbin:/usr/local/bin:/sbin/:/bin/:/usr/sbin/:/usr/bin/"
],
}->
The hieradata consists the below classloading:
classes:
- scmdemophp::edsconsoledeploy
the init.pp of edsconsoledeploy consists:
class scmdemophp {
$DocRootDir = "/app/code"
and I checked that the file "/app/code/notifyinactivetargetweekly.sh" exists.
↧