Cron Jobs Setup


Cron Jobs Setup

Estimated reading: 2 minutes 0 views

Cron Job is a Linux program which scheduled tasks or jobs to be executed at a certain time. In Zal Pro, we are executing some tasks as well for automation. Example: Auto Clear Stale Sessions, Send SMS, Auto Backup etc. For these reasons you need to make sure that cron job is running in your server/Linux/ubuntu properly. To check Cron Job status, run this below command to check if it’s running properly.

  • sudo service cron status;

Please make sure that you have these bash scripts in your server insideĀ /var/www/html/. Run this command to check :

  • cd /var/www/html && ls -lh | grep .sh;

If you do not have these bash scripts or if these scripts size is “0”, then please contact us immediately to properly install these scripts into your server. Without these scripts Zal Pro will not works as expected.


Set Cron Job tasks in your server, to schedule these tasks run this command.

Now copy below commands or tasks and paste in into your server’s cron job’s field.

## every day - every mid night
0 0 * * 0 /bin/bash /var/www/html/ >> /var/log/autobackup.log
## every minutes
* * * * * /bin/bash /var/www/html/ >> /var/log/stalesession.log
## auto renew every 30 minutes
*/30 * * * * /bin/bash /var/www/html/ >> /var/log/autorenew.log
## expired user sms notification every 15 minutes
*/15 * * * * /bin/bash /var/www/html/ >> /var/log/expireduser.log
## expiry user sms notification every 45 minutes
*/45 * * * * /bin/bash /var/www/html/ >> /var/log/expiryuser.log

Note: To Exit The Crontab Editor Press Ctrl + X; Then Press Y; To Save and Exit.

Share this Doc