Core code for anyjob