$allowAnonymous = true - not working I want to be able to access a plugin page without having to login (for a cron job).

I have added this to the plugin's controller:

protected $allowAnonymous = true;


However, this url still requires login:

/admin/[plugin]


(If I login to admin, the above url works.)

If I try the url without /admin:

/[plugin]


The page doesn't work at all (logged in or not):


  Page Not Found
  The requested URL was not found on this server.


How do I make it so I can access my plugin page without login?

BTW, I also have this in the [plugin]Plugin.php file:

public function registerCpRoutes()
{
  return array(
    '[plugin]' =&gt; array('action' =&gt; '[Plugin]/[Action]'),
  );
}
It sounds like you just want a cron job to trigger an action on your plugin.

You don't need to register any Control Panel routes for that, so you can remove your registerCpRoutes method.

If your plugin only has one controller, the URL your cron job would want to target would be:

yoursite.com/actions/pluginHandle/pluginAction


You can read more about it in the plugin controller docs.