Whether Sails has been bootstrapped or not will depend on where in the lifecycle you're trying to run the task. If you want to just run it from the command line cold, you can easily do that.
I believe you can do the following:
require('sails').lift(options,function(err) {
// Run my stuff here after Sails has been lifted
});