Timeline for Crontab addition not working
Current License: CC BY-SA 3.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 11, 2017 at 7:39 | vote | accept | GypsyCosmonaut | ||
| Jul 11, 2017 at 7:39 | comment | added | GypsyCosmonaut | Hi again @johannes , I found the solution, so thought it might be helpful to you and others to mention here. Yes you were right, the cron is running but cron does not have access to X sessions. I simply added this line to my cron and it worked. 1 1 * * * export DISPLAY=:0 && xhost local:$USER && /usr/bin/firefox so now it works perfect. Found my solution from this link with your help. serverfault.com/questions/280558/… Thank you so much.. | |
| Jul 9, 2017 at 16:40 | comment | added | johannes | This sounds like a job for curl or wget or maybe some short scripting ... but too broad for this site | |
| Jul 9, 2017 at 14:50 | comment | added | GypsyCosmonaut | I have my large data uploaded to mega.nz website which requires users to open its website at least once in 2 months or else they'd assume the account inactive and delete the data. So, I want Firefox to open mega.nz once every 2 weeks (in order to be on safe side). So can cron have access to X by any chance? If not, how can I achieve this? | |
| Jul 9, 2017 at 11:57 | comment | added | johannes | What's your actual goal? Adding cron entries works. | |
| Jul 9, 2017 at 11:32 | comment | added | GypsyCosmonaut | yes there is an error Error: GDK_BACKEND does not match available displays repeated so many times in my logs, check the question above, I have updated it with the error. What do I do? | |
| Jul 9, 2017 at 11:05 | comment | added | johannes | I'm quite sure it starts firefox, but firefox doesn't find a display it can use. Check your logs and mail (i.e. in /var/spool/mail) | |
| Jul 8, 2017 at 22:05 | comment | added | GypsyCosmonaut | I don't know, it adds 1 * * * * /usr/bin/firefox to /var/spool/cron/crontab/root but it just doesn't start firefox. Had a look on service cron status. it is running too. It does not add this to /etc/crontab although, if that is important. | |
| Jul 8, 2017 at 21:50 | history | edited | johannes | CC BY-SA 3.0 | added 441 characters in body |
| Jul 8, 2017 at 21:45 | history | answered | johannes | CC BY-SA 3.0 |