Hi,
How can I setup my osTicket to fetch an email even without agent is logged in?
I've already set enable email fetch and fetch on auto cron, which the system is accepting new ticket via email but only if there's an agent has login. My goal is even if there's no agent has login, new ticket via emails should be accepted. How could I do that? I've read the documentation, but I still don't get it properly. Appreciate your help.

  • KevinTheJedi replied to this.
  • Patrick-Helpdesk

    For windows you’d setup a Scheduled Task using the Task Scheduler. You’d want to provide the full path to PHP and then the argument of the full path to the api/cron.php file. You can google guides online on how to create a Scheduled Task in windows.

    Cheers.

    Patrick-Helpdesk

    For windows you’d setup a Scheduled Task using the Task Scheduler. You’d want to provide the full path to PHP and then the argument of the full path to the api/cron.php file. You can google guides online on how to create a Scheduled Task in windows.

    Cheers.

    Hi @ntozier, @KevinTheJedi
    Thanks guys for the response, appreciate it.
    What I did is set a schedule task on windows task scheduler. Set task ON A SCHEDULE, trigger on DAILY recure every 1 day and repeat every 5 minutes, I also check mark the RUN TASK AS SOON AS POSIIBLE AFTER A SCHEDULED START IS MISSED.
    Everything working fine.
    My only hard time is from my domain email since It was set to filter settings, Some email domains cannot be directly received by my default email, and had to release it first and open it in the webmail inbox so the osticket can fetch it, if not open it will not fetch. Still figuring it out.

    Thanks

    7 months later

    Eiltesir

    There are many guides online. Simply google “how to create a scheduled task windows”.

    Cheers.

    Setting Up Automatic Ticket Fetching on Windows Server

    This guide will walk you through setting up a scheduled task in Windows Server to automatically run a PHP script that fetches tickets from your ticketing system.
    Steps

    1. Open Task Scheduler

      • Press Win + R to open the Run dialog.
      • Type taskschd.msc and press Enter to open the Task Scheduler -or- simply click the windows button and search for "Task Scheduler"
    2. Create a New Task

      • In Task Scheduler, click on Create Task in the right-hand Actions panel.

      • Name the task (e.g., MyTicketsTask) and provide a description if desired.

    3. Configure Triggers

      • Go to the Triggers tab.

      • Click New to create a new trigger.

      • Set the trigger to Daily.

      • Specify the start date and time.

      • Check the box for Repeat task every and set it to 5 minutes.

      • Ensure the Enable box is checked.

      • Click OK to save the trigger.

    4. Configure Actions

      • Go to the Actions tab.

      • Click New to create a new action.

      • Set Action to Start a program.

      • In the Program/script field, browse to the path of php-cli.exe. Typically, this is located at C:\php\php.exe or similar.

      • In the Add arguments (optional) field, enter the path to your PHP script. For example: C:\yourtickets_website\api\cron.php.

      • Click OK to save the action.

    5. Check Other Settings (Optional)

      Conditions: Adjust any conditions that are necessary for your environment (e.g., only run when on AC power).
      Settings: Review and adjust settings like Allow task to be run on demand and If the task fails, restart every if needed.

    6. Confirm Cron Job Settings

      • Log in to your ticketing system's Admin Panel.

      • Navigate to Email > Settings.

      • Go to Autofetch and ensure that the cron job is deactivated if you're running the script manually through Task Scheduler.

    Important Notes

    Ensure the cron job is not active in the ticketing system’s settings to avoid conflicts with the Windows scheduled task.
    Permissions: Ensure that the user account running the scheduled task has appropriate permissions to access the PHP executable and the script file.

    By following these steps, you will have set up an automated task to regularly run your PHP script and fetch tickets from your ticketing system

      Eiltesir

      Ensure the cron job is not active in the ticketing system’s settings to avoid conflicts with the Windows scheduled task.

      This is simply not true. You need the Task Scheduler running PLUS the Email Fetching > Enable setting enabled in order for mail fetching to work. The one you don't want is the "auto-cron" setting.

      Cheers.

      Write a Reply...