I'm trying to automate a login process that can only be done through a browser. I am using the lynx browser to script the actions required to do this. Lynx does this by dumping a user's keystrokes into a file and then it allows a flag: -cmd_script=scriptfile to load the script.I invoke lynx:lynx -accept_all_cookies -cmd_script=myscript.lynx www.example.comFrom my interactive terminal, the resulting script works perfectly for me.I have cron run the task and it doesn't work. I checked /var/log/everything.log and I noticed that when the script ran, lynx asks:Your Terminal type is unknown!Enter a terminal type: [vt100]To fix this, I used the flag -term=linux which stopped the issue, but the login process still did not seem to get past the first page (by looking at the log file).I've tried as many suggestions as I could find. I copied the results from env (in the interactive terminal) and pasted them into the script to see if the environment would fix it, but alas it did not.Another note:My login process involves a redirect (which doesn't redirect in the lynx browser so I just follow the link it gives)
Running cron script with lynx fails to work
shell script;cron;lynx