How to manually run pending tasks in Craft CMS 3 I have a task that I want to run, but unfortunately I dont seem to be able to disable mod_gzip/mod_deflate on this server, so that task will not run in the background and causes the site to hang while processing the task.

Therefore, I have set the "runQueueAutomatically" config setting to false.

I want to trigger the task queue to run manually (via a cron job), but I'm not sure how. In Craft CMS 2 I could visit "/index.php?p=actions/tasks/runPendingTasks" as per the docs here https://docs.craftcms.com/v2/config-settings.html#runtasksautomatically but I can't find the same action for v3. Have gone through the docs and can't see it anywhere - can someone help?

Thanks.
Craft 3 default action to run the queue is 

public function actionRun(): Response
{
    // Prep the response
    $response = Craft::$app-&gt;getResponse();
    $response-&gt;content = '1';

    // Make sure Craft is configured to run queues over the web
    if (!Craft::$app-&gt;getConfig()-&gt;getGeneral()-&gt;runQueueAutomatically) {
        return $response;
    }

    // Make sure the queue isn't already running, and there are waiting jobs
    $queue = Craft::$app-&gt;getQueue();
    if ($queue-&gt;getHasReservedJobs() || !$queue-&gt;getHasWaitingJobs()) {
        return $response;
    }

    // Attempt to close the connection if this is an Ajax request
    if (Craft::$app-&gt;getRequest()-&gt;getIsAjax()) {
        $response-&gt;sendAndClose();
    }

    // Run the queue
    $queue-&gt;run();

    return $response;
}


So all you need is Craft::$app-&gt;getQueue()-&gt;run(). Every Craft 3 project comes with a default module so you can Enhancing a Craft CMS 3 Website with a Custom Module or if You Wanna Make a Craft 3 Plugin?