44
votes
Open chromium full screen on start up
Edit this file
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
And add this:
@xset s off
@xset -dpms
@xset s noblank
@chromium-browser --kiosk http://google.com/ # load chromium after boot and open ...
16
votes
Why is cron needed for Raspbian?
In Unix/Linux systems, lots of OS background tasks are run as cron jobs. To see what won't run if you stop the cron daemon, type these commands:
ls -la /etc/cron.hourly
ls -la /etc/cron.daily
ls -...
14
votes
Is there a way to remove old files without relying on internet time service?
Since you don't have Internet NTP, the file timestamps are meaningless, being reset to the Pi's "/etc/fake-hwclock.data" time whenever the system is booted.
If the daily data file(s) have a ...
10
votes
Open chromium full screen on start up
on chromium you can use --start-fullscreen (like F11)
10
votes
Why is cron needed for Raspbian?
cron runs tasks (system or user chosen) which need to be run at regular intervals.
By itself it uses negligible resources.
I suggest you leave cron alone.
9
votes
Execute a script at sunrise/sunset
If you want to run cron jobs with start times relative to sun up/down or twilight then you could use sunwait
It will determine the correct time to wait, based on your location's coordinates.
Simple ...
8
votes
Where is the cronfile located?
Like most Debian based systems, the crontab is stored in /var/spool/cron/crontabs
On a different note: Why are you trying to start your program using crontab? This is neither a good nor a standard ...
8
votes
Cronjob is set to run every 5 minutes but runs every minute
From man 5 crontab:
Step values can be used in conjunction with ranges. Following a range with "/<number>" specifies skips of the number's value through the
range. For example, "0-...
8
votes
Accepted
cron not executing python3
As is typical with crontab issues. The environment is not the same as your user or even a sudo/root shell , and env python3 may not return anything (env simply searches through
Instead you should ...
7
votes
Is there a way to remove old files without relying on internet time service?
On a system where the time resets on boot, you can't know what time it is when the system starts, and similarly can't know how long it was when the system was down. But you can count reboots, and you ...
6
votes
Accepted
How to automatically run a Python GPIO script at boot?
The easiest way to have something run at boot is via /etc/rc.local. Some systemd based distros (e.g., Arch and Fedora) have stopped including this, although it is easy to implement. Which doesn't ...
6
votes
Accepted
Is it necessary to release Raspberry Pi Camera before rebooting? If so how do I do it?
There is NO NEED to do anything before a reboot.
If you issue a sudo reboot command Linux will manage an orderly shutdown of the software.
This is, however, a poor way of ensuring a reliable 24/7 ...
6
votes
Accepted
What is the environment for cron?
We can ask cron to tell us what its environment is.
Create a shell script in your home directory (~/) as follows (or with the editor of your choice):
$ nano ~/envtst.sh
Enter/C+P the following in ...
6
votes
What's different about a crontab reboot?
As I understand your question:
You have a cron job to reboot your RPi every night at 01:00; e.g.
0 1 * * * sudo reboot (#or something similar; e.g. shutdown -r now)
You have a 2nd cron job to ...
6
votes
Accepted
Is there a way to remove old files without relying on internet time service?
Raspbian includes fake-hwclock, which saves the clock to the SD card on shutdown and restores it on boot. However, if you're just cutting the power to restart it, this is fairly useless; it will never ...
5
votes
Why are system logs not rotating?
I know I'm a little late to the game here, but since I found a reason for this not working for me, I wanted to help others:
This happened to me too, and I discovered a resolution yesterday.
Check to ...
5
votes
Launch Python script from Cron in foreground
To run in foreground you'd need to add DISPLAY=:0:
@reboot DISPLAY=:0 \usr\bin\python3 \home\pi\Desktop\photo_frames\get_random_row.py > /logs/cronlog
Or open it explicitly with xterm:
@reboot ...
5
votes
Accepted
Raspbian Jessie "wait for network" Vs. Cron @reboot entries
will the entire system halt until the network is up
No.
where in the boot-up sequence is crontab activated?
Crontabs are managed by cron, a system daemon started by init, which on Raspbian jessie ...
5
votes
Execute a script at sunrise/sunset
I tried sunwait, mentioned above, but found it to be a bit clunky. I rewrote a similar program, myself, called heliocron, with the advantages being that it is actively maintained, has clear ...
5
votes
Why is cron needed for Raspbian?
Cron is actually very useful. Say you wanted to run a program once a day, then cron is your friend. You can schedule to run a program at any time during the day. I would definitely leave it on your ...
5
votes
Accepted
Can't run python script on startup. Raspberry Pi 4
You've run into a well-known limitation with cron. The question has been asked and answered here many times. This recent example highlights the two (at least two) choices you have:
use cron (older, ...
4
votes
Where do Cron error message go?
Crontab has several parameters (in additional to time execution lines)
For example:
MAILTO="you@example.com"
SHELL="/bin/bash"
4
votes
Issue scheduling a task in raspbian to email my out facing ip
Try to use absolute paths inside your bash script.
read ip1 < ip.txt
and
echo "$ip2" > ip.txt
Change ip.txt to /home/pi/ip.txt or something like that.
The other thing would be the crontab ...
4
votes
Print output not shown when run Python script CRON
As others have noted in the comments, you need to redirect the output from the command somewhere.
This will write to a file, overwriting the file if it already exists.
@reboot python /home/pi/...
4
votes
Accepted
Using Wiringpi in crontab to control GPIO pins on RaspberryPi
The most common error in crontabs seems to be not giving the full paths to programs or data used.
Use the which command to find where gpio is stored on your machine (probably /usr/local/bin/gpio) and ...
4
votes
Accepted
Get Bash instead of /bin/sh in a VNC session started by cron
It seems like the problem originates form cron using /bin/sh and not the users SHELL default. I found other people having the same problem at
Default shell for cron issue
How to change cron shell (sh ...
4
votes
Accepted
What's wrong with this little python script?
You never flush the buffer, thus, the info is not being dumped to the file. This is done when the file is closed (you never do it), assigning a buffer size (see this stackoverflow answer and comments ...
4
votes
Accepted
Cronjob is missing the GET parameter in Raspberry Pi
The problem is that cron doesn't wait for your network to come up before it runs @reboot. The explanation as to why cron operates this way, and alternatives to cron are verbose, but have all been ...
4
votes
Accepted
Automatic shutdown of Pi based on timer
You've made a couple of mistakes, all par for the course. Let's step through this, get it working, and hopefully learn one other trick to help you help yourself in the future:
First, the "other ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
cron × 252python × 63
raspbian × 56
boot × 23
bash × 17
python-3 × 15
script × 13
pi-3 × 10
ssh × 9
linux × 8
raspbian-buster × 8
gpio × 7
raspbian-stretch × 7
reboot × 6
usb × 5
pi-3b+ × 5
shutdown × 5
networking × 4
pi-2 × 4
display × 4
raspbian-jessie × 4
vnc × 4
server × 4
mount × 4
chromium × 4