The cron job of the web server
Online, a cron job added in cPanel runs every 5 minutes and does the background work of PunchPlus Web: reports, schedules and alerts by email, watched folders and the update check. The Home screen warns when it stops.
When PunchPlus Web runs online (on the web server, for example at punch.inforap.com), a cron job does its background work. A cron job is a command that cPanel runs on its own, on a schedule, even when nobody has PunchPlus Web open.
Every 5 minutes, the cron job:
- notes that it ran (Settings shows the time of its last run);
- checks for a new version of PunchPlus Web and of PunchPlus Clock, when the check is due (see Updates);
- imports the files of the watched folders;
- sends the PunchClock alerts and the follow-up alerts by email (see PunchClocks and Company and branches);
- sends the reports and the work schedules that are due by email (see Reports by email).
On a computer (PunchPlus Web installed on a PC), there is no cron job: PunchPlus Web does all this itself while it is open.
How to add the cron job in cPanel
- In PunchPlus Web, open Settings, panel Reports by email, and copy the command shown there (it starts with
cd /home/and ends with-m punchweb.mailer). The warning of the Home screen shows the same command. - In cPanel, search for Cron Jobs and open it.
- Under Add New Cron Job, in Common Settings, choose Once Per Five Minutes (*/5 * * * *).
- Paste the command in Command.
- Click Add New Cron Job.
Within 5 minutes, Settings shows the time of the last run under the command, and the warning disappears from the Home screen.
When the Home screen says the cron job is not running
The Home screen shows The cron job of the web server is not running when it has not run for more than 20 minutes (or never ran). Check in cPanel > Cron Jobs that the job is there, that it runs Once Per Five Minutes, and that its command is exactly the one shown in Settings (after a move of PunchPlus Web to another folder, the command changes).
To see what the cron job does, run it by hand: in cPanel, open Terminal and paste the command; it prints the errors, if any.