Just to note, as the author or cronjob: this is not an issue with cronjob, but with library code of another package which assumes you are in a connection thread.
I ran into the same issue with the Calendar package. During the last 'upgrade' to that package a bunch of library code was written that assumed a connection thread. This made using the code from another app impossible.
My opinion: library code should avoid this assumption. You could also run into the same problem with the package instance id for subsite aware applications. In making a package subsite aware, you could inadvertently make the package useless as a service to other packages. (Of course Calendar also had this problem, I seem to remember.)
If possible it would be nice to first design the data model of a package as a service, and apply the UI as an interface to the data model, then problems of how to get the user_id and package_id will already be solved.