# By default you are asked for a password on the terminal.
# A password file may be used. e.g. password_file = ".passwd"
# The password file should consist of lines containing
# Python tuples of any of the following formats:
# (code, family, username, password)
# (family, username, password)
# (username, password)
password_file = None
create a password file with
and add the following line to your user-config.py:
password_file = "name of the password file"
Instead of asking for the password, the bot will then just use the password provided there.
This is a good idea for cron jobs in any case, because (if I remember correctly) cookies on WMF servers only have a lifespan of a month, so even without the issue you describe you'd have to log in every month or so.
Hope this helps,