System : Cronjobs

Cronjobs are useful for creating periodic and recurring tasks

Yanar avatar
Written by Yanar
Updated over a week ago

System : Cronjobs

Cron is a time-based job scheduler in Unix-like computer operating systems. It typically automates system maintenance or administration, allowing certain commands or scripts to run at fixed times, dates, or intervals. These "postponed" commands or jobs are commonly referred to as Cronjobs.

Cron can run simple commands, shell scripts, and programs written in languages such as PHP. If a task can be completed on the command line or in a script, you can automate it with the task scheduler. For example, you can run news import by cron, or send out notifications to the site users, without having to manually launch the process.

In the PG Dating Pro software, cronjob settings are located in Services > Customize your service > System > Cronjobs (/admin/cronjob).

Cronjob management lets you configure certain commands or scripts to run at fixed times, dates, or intervals.

Different tasks are assigned by the system to run periodically. You can activate/deactivate them, run manually, view execution logs, or edit periods.

We recommend that you run the scripts no more often than once in every 5 minutes. For better server performance, do not run many tasks in quick succession.

Here are some of them:

  • Currency rates updater - updates the currency rates.

  • Clean after expiration - Highlight in search - updates the Highlight in search service activity for users.

  • Clean after expiration - Lift up in search - updates the service activity Lift up in search for users.

  • Clean after expiration - Activity in search - updates the service activity Activation in search for users.

  • Canceled Video chats - disables video chats whose status has not been updated for a long time.

  • Clear trash - removes accumulated temporary files of the script, so as not to fill the server space.

  • Delete users content - after deleting users, only fields from pg_users table are deleted. All other data are deleted by this cron.

  • Feed parser - loads new articles from the rss news feed.

  • Notification sender - sends emails that are in the mailing queue. 10 pieces at a time.

  • Number of user registrations - updates the statistics on the admin's home page.

  • Process network temp - Loads users from the Network.

  • Remove old menu indicators - removes the old initiators of the new payments and items for moderation.

  • Sitemap generation - runs the generation of Sitemap in xml format

  • Statistics handler - updates statistics on admin's home page.

  • Subscriptions sender - sends created by admin mailing lists, if there is selected not to run manually.

  • Time alert for video chat - update for video chat with pay-per-view.

  • Update banner statistic - updates banner statistics (views and clicks).

  • Update users groups - updates groups (memberships) of users after their expiration. After the purchase the groups will be changed immediately.

  • Update users offline status - updates users from online to offline status if they have not been active on the site for 10 minutes.

  • Video image cropping - launches thumbnail cropping for video.

  • Video processing - launches processing of video into required format for storage and further launching.

  • Video check youtube status - uploads video to YouTube if it's configured (instead of saving it locally on the server).

Warning! Do not try to modify the scripts periods unless you have to and you know how to maintain them! The resulting issues may break the software functioning easily!

Typical configuration that is required to be set at the server:

* /5 *​ * * * /usr/local/bin/php -f /home/public_html/cl_index.php /cronjob/

where /usr/local/bin/php is a path to PHP interpreter,

and /home/public_html/cl_index.php is a path to cl_index.php file located in the root folder of the installed product.

Did this answer your question?