> Can you run it with bash -x from cron? Hopefully it tells where it breaks
Using bash will not help here, that's the problem. cron-apt is a /bin/sh script, and on many systems /bin/sh is dash. And, $RANDOM doesn't exist in dash. Change cron-apt's shebang line to use /bin/bash and it should be fine. Now we probably can move on to stage 6 of debugging "how did that ever work?", since we're having /bin/sh point to dash for a while and this issue just appeared on of my _stable_ systems. Greetings Marc