You are not logged in.
Pages: 1
Installed fcron and used fcrontab -e to create the following crontab file:
%mins,nice(7) 1 08-18 firefox
Edit: This was replaced with "01 * * * * /bin/echo Hello, world!" to avoid any problems specific to starting firefox (see comments below).
Then used:
systemctl enable fcron
systemctl start fcron
I think this should execute every minute, but nothing happens. How do I go about troubleshooting this?
Last edited by eeenilsson (2017-11-14 14:21:24)
Offline
Thanks!
Tried instead adding the following to fcrontab:
13 00 * * * DISPLAY=:0.0 /usr/lib/firefox/firefox
and
13 00 * * * env DISPLAY=:0 /usr/lib/firefox/firefox
(ie at 13:00, 2 minutes after running systemctl fcron start)
..but no effect.
Last edited by eeenilsson (2017-11-14 12:07:00)
Offline
I'm not particularly familiar with crontabs - but there is no time zone in which the time of 13 minutes after midnight passed between our posts.
EDIT: 13 00 is not 1300, it is 0013. Again, read the documentation first.
Last edited by Trilby (2017-11-14 12:08:17)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thanks! (I guess newbies corner is really the correct place for me to post). I tried adding:
08 13 * * * env DISPLAY=:0 /usr/lib/firefox/firefox (ie corrected time setting 13:08)
@ 1 * * * * env DISPLAY=:0 /usr/lib/firefox/firefox (should execute every minute)
...but still nothing.
Last edited by eeenilsson (2017-11-14 12:17:45)
Offline
Offline
Both paths start firefox in konsole. However, firefox was just used to test that fcron was running. To avoid getting sidetracked by any peculiarities to starting firefox, I instead tried adding:
01 * * * * /bin/echo Hello, world!
As per the axample in https://wiki.archlinux.org/index.php/Cron
...but still no effect after running systemctl start fcron
Offline
What do you expect "echo Hello, World" to do?
Do you edit the users or the roots crontab?
Offline
I guess it should print the message in konsole?
I use fcrontab -e to edit the crontab. How do I know if it is users or root crontab? It seems to be created in /tmp/ when i first run fcrontab -e
Last edited by eeenilsson (2017-11-14 13:17:09)
Offline
I guess it should print the message in konsole?
Why? And which konsole in particular?
It'll print to the stdout of the fcron job ...
/bin/bash -c 'echo test > /tmp/fcron.test'I use fcrontab -e to edit the crontab. How do I know if it is users or root crontab?
It's the one of the calling user - "whoami"
Offline
I got this to work using cronie instead of fcron: 08 13 * * * env DISPLAY=:0 /usr/bin/firefox
Offline
Thanks for the explanation!
In that case it was the user crontab I used.
I got this to work using cronie instead of fcron: 48 13 * * * env DISPLAY=:0 /usr/bin/firefox
Possibly I was missing a blank line at the end of the crontab when using fcrontab - Cronie gave a warning but fcron did not when blank line was omitted.
Will try to make some more testing with fcron when I have the time.
Last edited by eeenilsson (2017-11-14 13:51:35)
Offline
I got this to work on fcron also.
To summarize:
1. Install fcron
2. > systemctl enable fcron
3. > systemctl start fcron
4. > fcrontab -e
Put the following in crontab:
*/1 * * * * /bin/bash -c 'echo test > /tmp/fcron.test'
Remember to add a blank line to the end of the crontab file!
This created the file "fcron.test" in the /tmp/ directory.
To start firefox the disply option should be used:
*/20 * * * * DISPLAY=:0.0 /usr/lib/firefox/firefox
Thanks to Seth and the others helping out!
Last edited by eeenilsson (2017-11-14 14:10:39)
Offline
Pages: 1