-
How to save crontabs
I've some problems using crontabs. I've my cron jobs working great doing this:
mkdir -p /var/spool/cron/crontabs
crond -c /var/spool/cron/crontabs (have to do this, otherwise nothing gets working, dont no why)
crontab -e
03 1 * * * /tmp/harddisk/ftp_pub/kill.sh
55 7 * * * /tmp/harddisk/ftp_pub/kill.sh
flashfs save
flashfs commit
BUT, every time i reboot the router all the cron jobs are gone! By the way, i'm using the v. 1.9.2.7 CR3c [Oleg] Firmware. Am i missing anything?
Tks in advance
-
I think you have to add you admin file to .files in your home folder to save this with flash
Check the content of your /var/spool/cron/crontabs folder. You have to add all the files like this:
Code:
echo /var/spool/cron/crontabs/admin >> /usr/local/.files
-
Also don't forget flashfs enable after flashfs commit
-
Tks a lot! My settings are now being saved, but i've another problem. It seems that crond is not restarting after reboot, my cron jobs wont work until i manualy type:
crond -c /var/spool/cron/crontabs
so i get on the log in wb interface:
Feb 19 15:25:21 crond[153]: crond 2.3.2 dillon, started, log level 8
What should i do to set the crond do start in boot sequence?
Tks a lot in advance
-
do you have a /tmp/local/sbin/post-boot script?
It should have
Code:
#!/bin/sh
crond -c /var/spool/cron/crontabs
then chmod a+x tmp/local/sbin/post-boot
Don't forget to flashfs save commit enable after that
-
By the time of your reply, i've been reading wiki files, and i done what you suggested. i wrote a post-boot script with /bin/busybox crond, and now everything is fine.
So i think my doubts are done! tks a lot for help me hugo