thanks and EL startup script

22 views
Skip to first unread message

matt.w...@4cite.com

unread,
Feb 12, 2013, 4:02:02 PM2/12/13
to hcron...@googlegroups.com
Thanks.  This is exactly what i was looking for.  

A couple of options you may wish to include - allowing a send from address in the main config instead of sending from user@hostname.  (we have internal hostnames that are not resolvable from the outside.  Our 3rd party mail provider was rejecting.)  I added this option.  let me know if you want me to submit my code (it is all of one line, so you probably don't.)

also, in case anyone is looking for a EL (centos, RHEL, etc.) startup script:

#!/bin/sh
#
# Start/stop the hcron scheduler.
#
# chkconfig:         2345 90 60
# processname:       hcron
# description:       hcron is a substitute for the standard UNIX cron. It provides
#                    a number of enhancements, especially in the area of event
#                    definition: one event per file, optionally organized
#                    hierarchically
# pidfile:           /var/run/hcron.pid
# config:            /etc/hcron
. /etc/rc.d/init.d/functions

PID_FILE_PATH="/var/run/hcron.pid"

test -f /usr/sbin/hcron-scheduler || exit 0

start() {
    echo -n "Starting hcron command scheduler: hcron-scheduler "
    daemon /usr/sbin/hcron-scheduler
    echo ""
}

stop() {
    echo -n "Shutting down hcron command scheduler: hcron-scheduler "
    killproc hcron
    rm -f "${PID_FILE_PATH}"
    echo ""
}

restart() {
    stop
    start
}

reload() {
    echo -n "Reloading hcron command scheduler: hcron-scheduler "
    killproc hcron -HUP
    echo ""
}

rhstatus() {
    status hcron
}

case "$1" in
start)
    start
    ;;
stop)
    stop
    ;;
restart)
    restart
    ;;
reload|force-reload)
    reload
    ;;
status)
    rhstatus
    ;;
*)
    echo "Usage: /etc/init.d/hcron {start|stop|restart|reload|force-reload|status}"
    exit 2
    ;;
esac
exit 0


Thanks again.

John

unread,
Feb 13, 2013, 7:30:54 AM2/13/13
to hcron...@googlegroups.com
On 02/12/2013 04:02 PM, matt.w...@4cite.com wrote:
Thanks.  This is exactly what i was looking for.  

A couple of options you may wish to include - allowing a send from address in the main config instead of sending from user@hostname.  (we have internal hostnames that are not resolvable from the outside.  Our 3rd party mail provider was rejecting.)  I added this option.  let me know if you want me to submit my code (it is all of one line, so you probably don't.)

Hi,

Glad you like it. I'll take a look at adding the option you mention.

Thanks,
John

--
You received this message because you are subscribed to the Google Groups "hcron-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hcron-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages