Craft CMS 2 Task progression In Craft CMS 2, I've created a task for updating Craft Commerce products from an Excel file. Everything's working correctly except the UI progression bar. The progression bar in control panel stays at 0 %, even if in database, I see steps increasing. Then when task is finished, it goes directly to the end (100 %) and disappear. I noticed that it will happen if I call for 

craft()-&gt;commerce_products-&gt;saveProduct($product);


If I comment this line, progression works correctly. Any idea on what's going wrong?
As far as I know you should manually set the progress value. The task can't determine the progress by itself, unless you are returning/polling this data.

An example of how we use it, for sending activation mails to multiple users;

public function execute($queue)
{   
    // creation date of user        
    $days = ($this-&gt;data['creationDate']) ? $this-&gt;data['creationDate'] : 7;

    // get pending users
    $dateFilter = (new \DateTime( $days . ' days ago'))-&gt;format(\DateTime::ATOM);
    $users = \craft\elements\User::find()-&gt;status('pending')-&gt;dateCreated(" &lt; {$dateFilter}")-&gt;all();

    // loop
    $totalUsers = count($users);
    $currentUser = 0;   

    foreach($users as $user) {          
        // send mail
        $result = $this-&gt;sendReminderMail($user);

        // update progress          
        $this-&gt;setProgress($queue, $currentUser++ / $totalUsers);
    }
}


setProgress is used to update the progress, which will be visible in the CP.