cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
410
Views
0
Helpful
2
Replies

Setting up crond on 5.1 appliance

gdntsoc
Level 1
Level 1

Greetings all. I have a 4215 appliance running 5.1(p1). I want to create and run scheduled tasks via crond. This is what I've tried,

1. As root, create a /var/spool/cron/crontabs directory.

2. As root, add a scheduled task via 'crontab -e'. I can see 'cron.update' and 'root' files created in /var/spool/cron/crontabs.

3. Add '/usr/sbin/crond &' to /etc/rc.d/rc.local (also tried to create Sxxcron script in /etc/init.d/)

As long as my sensor is not rebooted, crond runs my tasks as scheduled. The minute I reboot, /var/spool/cron/crontabs disappears and my cron job vanishes.

What's the correct way to set up crond + scheduled taks and keep them persistent across reboot? Thank you.

2 Replies 2

gdntsoc
Level 1
Level 1

Wanted to add one note...

Upon reboot, crond is not restarted from either rc.local or my Sxxcron script in /etc/init.d. So, curious to know how to start crond upon reboot.

mhellman
Level 7
Level 7

In the old version (4.1) we used to do some of that stuff. 5.x required too many modifications, so we decided against it. We now use perl to perform all the required tasks remotely (logging in via the service account). Have you considered this approach?

Review Cisco Networking for a $25 gift card