Koozali.org: home of the SME Server

Cron admin panel

Offline markehle

  • ***
  • 125
  • +0/-0
Cron admin panel
« 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

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Cron admin panel
« Reply #1 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.
......

Offline crazybob

  • ****
  • 894
  • +0/-0
    • Stalzer R&D
Cron admin panel
« Reply #2 on: October 06, 2004, 01:32:27 PM »
There is a cron panel add on from dungog.net, but it is not free.
Bob
If you think you know whats going on, you obviously have no idea whats going on!

Offline markehle

  • ***
  • 125
  • +0/-0
Cron admin panel
« Reply #3 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!

BobWilliams

Cron admin panel
« Reply #4 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...

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Cron admin panel
« Reply #5 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
......

Offline markehle

  • ***
  • 125
  • +0/-0
Cron admin panel
« Reply #6 on: October 08, 2004, 03:08:10 PM »
JB -

Thanks - that is exactly what I need.

Later -

Mark

BobWilliams

Cron admin panel
« Reply #7 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...

Offline markehle

  • ***
  • 125
  • +0/-0
Cron admin panel
« Reply #8 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

BobWilliams

Cron admin panel
« Reply #9 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...

bobk

Cron admin panel
« Reply #10 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".