14K Views

How to Refresh Mailbox Using Cron Job in UVdesk OpenSource

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:

crontab -e

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

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,

Support

There are a lot more things to learn and develop, feel free to contribute to an enterprise-level open-source helpdesk.

Category(s) Symfony UVdesk
. . .

Comments (2)

Add Your Comment

  • Vitaly
    In my case, I just added ‘php /path_to_project_folder/bin/console uvdesk:refresh-mailbox your_mailbox_id’
    to crontab and everything works fine.
    So what is the purpose of function ‘execute’ overridding and the line ‘php /project_root_forlder_path uvdesk:refresh-mailbox’ in your crontab expression?
    • Himani Gupta
      Hello Vitaly,
      Nice day to you!!
      what is the purpose of function ‘execute’ overridding and the line ‘php /project_root_folder_path uvdesk:refresh-mailbox’ in your crontab expression?
      >> The execute function associated with the community project script not crontab expression. You can go with the user guide to setup cronjob and start delivering excellent support.
      Still, you have a further issue or any kind of doubt, reach out to us at support@uvdesk.com
      Kind Respects
      UVdesk Team
  • css.php