Cron through cli.php
I managed to find the solution. It seems the Drupal account used for the cron has to be synchronized with CiviCRM (to create its CiviCRM Contact) first before it can run.

Use the menu to trigger manual synchronization: Administer -&gt; Users and Permissions -&gt; Synchronize Users to Contacts.