Cron Jobs.

Posted: by Unknown in
0

A cron job is a Linux command for scheduling a command or script on your server to complete repetitive tasks automatically. Scripts executed as a cron job are typically used to modify files or databases; however, they can perform other tasks that do not modify data on the server, like sending out email notifications.

 

Cron Jobs:
-Create a directory for cron PID.
# mkdir -p /var/run/a2billing
-Change ownership of cron files.
# chown -R apache:apache /usr/local/src/a2billing/Cronjobs/*
# chown apache:apache /var/run/a2billing
-Create cron jobs.
echo "
# Automatically added for A2Billing
0 * * * * php /usr/local/src/a2billing/Cronjobs/a2billing_alarm.php
0 12 * * * php /usr/local/src/a2billing/Cronjobs/a2billing_archive_data_cront.php
0 10 21 * * php /usr/local/src/a2billing/Cronjobs/a2billing_autorefill.php
#Batch process at 00:20 each day
20 0 * * * php /usr/local/src/a2billing/Cronjobs/a2billing_batch_process.php
#Bill DID usage at 00:00 each day
0 0 * * * php /usr/local/src/a2billing/Cronjobs/a2billing_bill_diduse.php
#Generate Invoices at 6am everyday
0 6 * * * php /usr/local/src/a2billing/Cronjobs/a2billing_batch_billing.php
#Check if balance below preset value, and email user if so.
1 * * * * php /usr/local/src/a2billing/Cronjobs/a2billing_notify_account.php
#Charge subscriptions at 06:05 on the 1st of each month
0 6 1 * * php /usr/local/src/a2billing/Cronjobs/a2billing_subscription_fee.php
#Update currencies at 01:00 each day
0 1 * * * php /usr/local/src/a2billing/Cronjobs/currencies_update_yahoo.php
" > /var/spool/cron/apache
-Enable The Cron Job Daemon.
-Click "SYSTEM SETTINGS">Group List>notifications  Click "DETAILS">Click "Notications Cron Module" change the  "VALUE" to "YES".