In this blog we will discuss how you can automate the periodic execution of UVDesk Mailbox refresh commands. To implement this, we will utilise cron job scheduling.
Run Cron Job
To Run cron job in uvdesk opensource you just need to run the below command:
Add the following cron expression to the crontab for automatic Mailbox Refreshing, (in the command below, the command will execute every 30 minute):
*/30 * * * * php /project_root_folder_path/bin/console uvdesk:refresh-mailbox your_mailbox_id
Now, if you are new to cron scheduling, below is how you can set the periodic execution timing to your exact requirement://The format is as follows: +---------------- minute (0 - 59) | +------------- hour (0 - 23) | | | | +---------- day of month (1 - 31) | | | | +------- month (1 - 12) | | | | | | | | +---- day of week (0 - 6) (Sunday=0 or 7) | | | | | * * * * * command to be executed
How to run Multiple Mailbox together?
Need to place && between two refresh commands and you will be ready to run multiple mailboxes.
*/30 * * * * php /project_root_folder_path/bin/console uvdesk:refresh-mailbox your_mailbox_id_1 && php /project_root_folder_path/bin/console uvdesk:refresh-mailbox your_mailbox_id_2 && php /project_root_folder_path/bin/console uvdesk:refresh-mailbox your_mailbox_id_3
That’s all about to Run Cron job in uvdesk opensource. I have explored this while contributing to the open-source Symfony based project UVDesk,
There are a lot more things to learn and develop, feel free to contribute to an enterprise-level open-source helpdesk. Further, you can also reach out to us for more queries or any kind of doubt at email@example.com