Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: markehle on October 05, 2004, 08:54:46 PM

Title: Cron admin panel
Post 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
Title: Cron admin panel
Post by: mrjhb3 on October 06, 2004, 04:25:02 AM
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.
Title: Cron admin panel
Post by: crazybob on October 06, 2004, 01:32:27 PM
There is a cron panel add on from dungog.net, but it is not free.
Bob
Title: Cron admin panel
Post by: markehle on October 07, 2004, 02:32:57 PM
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!
Title: Cron admin panel
Post by: BobWilliams on October 07, 2004, 11:10:11 PM
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...
Title: Cron admin panel
Post by: mrjhb3 on October 08, 2004, 04:08:00 AM
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
Title: Cron admin panel
Post by: markehle on October 08, 2004, 03:08:10 PM
JB -

Thanks - that is exactly what I need.

Later -

Mark
Title: Cron admin panel
Post by: BobWilliams on October 08, 2004, 03:15:37 PM
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...
Title: Cron admin panel
Post by: markehle on October 08, 2004, 05:59:08 PM
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
Title: Cron admin panel
Post by: BobWilliams on October 08, 2004, 06:02:55 PM
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...
Title: Cron admin panel
Post by: bobk on October 09, 2004, 12:28:40 AM
Quote from: "markehle"
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".