Forum Discussion

Sugraman_297082's avatar
Sugraman_297082
Icon for Nimbostratus rankNimbostratus
Feb 10, 2017

Cronjob for saving UCS file not working

Hi I created a cronjob for saving the UCS file with the date. Below is what i have done. But it is not working. Since this is the fist time am trying, am not sure if am missing something. "ucs-daily" is the name of the file

[root@f5:Active:In Sync] etc more crontab

SHELL=/bin/bash

PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO="" HOME=/

run-parts

01 * * * * root run-parts /etc/cron.hourly

02 4 * * * root run-parts /etc/cron.daily

22 4 * * 0 root run-parts /etc/cron.weekly

42 4 1 * * root run-parts /etc/cron.monthly

**0 7 * * 5 ucs.daily

[root@f5:Active:In Sync] cron.daily ls -l ucs*

-rwx------ 1 root root 83 Feb 10 04:49 ucs-daily

[root@f5:Active:In Sync] cron.daily more ucs-daily

!/bin/bash

$DATE=

date "+%m_%d_%y"

tmsh save /sys ucs /var/local/ucs/$DATE.ucs

[root@f5:Active:In Sync]