Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: markehle on October 05, 2004, 08:54:46 PM
-
Hello, All -
I need to automate some tasks for moodle, and I can't seem to find anything on cron on this site.
Is there an admin panel for cron?
Thanks!
Mark
-
No admin panel for cron. You can put your entries in /etc/cron.d, /etc/cron.daily, /etc/cron.weekly,
/etc/cron.monthly, or /etc/crontab.
Use the appropriate templates or templates-custom, expand the template, then stop and restart cron and you are all set.
-
There is a cron panel add on from dungog.net, but it is not free.
Bob
-
thanks, mrjhb3, for the instructions.
Crazybob - I knew that dungog sold one. For as little as I will be needing it, I guess I will be doing it by hand.
Thanks!
-
mrjhb3, Could you explain to a newbi what an appropriate template is?
I'm trying to create a cron daily backup job using rsync. Any help would be appreciated.
Thanks
Bob...
-
Hello,
Here is an example from my system.
I have created a directory
/etc/e-smith/templates-custom/etc/cron.d/changetape
inside this directory I have created a file called 10changetape with the following contents
0 19 * * 1-7 root /usr/sbin/mtx -f /dev/sgb next > /dev/nul
0 20 * * 1 root /usr/sbin/mtx -f /dev/sgb next > /dev/nul
now I expand that template
/sbin/e-smith/expand-template /etc/cron.d/changetape
after that, I have an entry in /etc/cron.d called changetape.
Then restart crond:
/etc/rc.d/rc7.d/S40crond restart
now my entries will be ran at the time I want them to.
Let me know if that helps or not.
JB
-
JB -
Thanks - that is exactly what I need.
Later -
Mark
-
Jb, Thanks as well. That helps alot. I will develop my rsync cron job with that information and let you know how I make out.
thanks again.
Bob...
-
Oops -
I created:
/etc/e-smith/templates-custom/etc/cron.d
I placed a file in there called 10moodle, which has in it this:
*/5 * * * * php /home/e-smith/files/ibays/moodle/html/admin/cron.php > /dev/null
When I run:
/sbin/e-smith/expand-template /etc/cron.d/moodle
it says:
ERROR: No templates were found for /etc/cron.d/moodle.
at /sbin/e-smith/expand-template line 49
What am I missing?
Thanks!
Mark
-
I have the exact same problem Mark. I'm trying to figure out whats worng. I know the file is there using mc I can see it there but can't see it via a dir or ls -l.
Bob...
-
Oops -
I created:
/etc/e-smith/templates-custom/etc/cron.d
I placed a file in there called 10moodle, which has in it this:
*/5 * * * * php /home/e-smith/files/ibays/moodle/html/admin/cron.php > /dev/null
When I run:
/sbin/e-smith/expand-template /etc/cron.d/moodle
it says:
ERROR: No templates were found for /etc/cron.d/moodle.
at /sbin/e-smith/expand-template line 49
What am I missing?
Thanks!
Mark
If you want your template to be called "moodle" then you need to create the subdirectory "moodle" in /etc/e-smith/templates-custom/etc/cron.d.
If you placed your custom fragment in /etc/e-smith/templates-custom/etc/cron.d, just do /sbin/e-smith/expand-template /etc/cron.d without the "moodle".