#!/bin/sh
##
##  orangescrum-cron
##

server=`grep '^Listen' @l_prefix@/etc/orangescrum/orangescrum-apache.conf | head -1 | awk '{ print $2; }'`
when="$1"
shift
case "$when" in
    daily )
        @l_prefix@/bin/php -q @l_prefix@/libexec/orangescrum/app/webroot/cron_dispatcher.php /cron/email_notification
        @l_prefix@/bin/php -q @l_prefix@/libexec/orangescrum/app/webroot/cron_dispatcher.php /cron/dailyupdate_notifications
        @l_prefix@/bin/php -q @l_prefix@/libexec/orangescrum/app/webroot/cron_dispatcher.php /cron/dailyUpdateMail
        ;;
    weekly )
        @l_prefix@/bin/php -q @l_prefix@/libexec/orangescrum/app/webroot/cron_dispatcher.php /cron/weeklyusagedetails
        ;;
esac


