Questions tagged [cron]
the job scheduler in Linux and other Unix-like operating systems. It enables users to schedule tasks to run non-interactively at specified intervals or predefined times, including upon reboot.
257 questions
1
vote
2
answers
799
views
Launching Python code on start-up
I'm making a robot using a Raspberry Pi.
I have written code for it in Python and I would like the Python script to run as soon as the Pi is powered.
I only want the whole script to repeat the whole ...
1
vote
6
answers
18k
views
How to move mouse pointer to a specific location on the screen AT BOOT?
I recently downloaded the latest and greatest Raspbian OS for my PI, enabled hide function on taskbar and have installed xdotool. For what I want to use PI for, I need to have the taskbar hidden at ...
1
vote
0
answers
279
views
Cron job won't run bash script [duplicate]
I'm trying to create a cron job that will run at the beginning of every hour on raspbian
My script is as follows:
#!/bin/bash
timeout 150s chromium-browser http://touchcast.com/tjin_daily/...
2
votes
1
answer
588
views
User cron job permission denied to directory owned by the user
I am using Raspbian Jessie. I have a cron job for pi user as follows:
SHELL=/bin/bash
@reboot /path/to/execute_script.sh
The script I am executing involves creating directories on a mounted USB ...
1
vote
3
answers
2k
views
Run autossh on reboot through crontab
I'm trying to run two command at reboot on my raspberry pi.
Here is what I tried :
@reboot sudo su - pi -c "screen -dm -S myscript_cron python ~/myfolder/myscript.py"
@reboot sudo su - pi -c "screen ...
2
votes
1
answer
3k
views
Create ssh tunnel on startup
I have looked at various questions but none seems to work...
I have a remote Pi that for various reasons tends to lose power occasionally and then boot back up. I don't have physical access to this ...
-1
votes
1
answer
901
views
How to start a VNC session correctly on Raspbian?
I start my VNC server via a @reboot vncserver & entry in my user's crontab.
But this seems to cause some problems since the cron environment is restricted. For examples see:
Get Bash instead of /...
1
vote
3
answers
5k
views
How to get shutdown and reboot buttons of `lxde-pi-shutdown-helper` working
I am running my the PIXEL desktop of Rasbian (Jessie) in VNC started by cron. In this case the Shutdown and Reboot of the shutdown menu do not work (only Logout).
How can I get shutdown and reboot ...
1
vote
1
answer
773
views
rSync Raspberry Pi Files to Android?
I'll try to keep this as straightforward as possible. This project involves a Raspberry Pi 3, and an Android device.
The Pi
Setup as a wireless access point (WiFi) which will have NO internet access ...
0
votes
1
answer
332
views
How can I stop this script (date an time with I2C LCD)
I found this script to show date an time on this site: http://www.circuitbasics.com/raspberry-pi-i2c-lcd-set-up-and-programming/
Once is running how can be it stoped? I like the idea of showing the ...
1
vote
0
answers
192
views
cron-apt is always unable to connect to network
I am using cron-apt to keep my Pi up to date. However, since a few weeks, I always get these error messages in the mail, when cron-apt runs:
CRON-APT RUN [/etc/cron-apt/config]: Sat Feb 25 04:00:01 ...
2
votes
1
answer
111
views
Send messages to main boot up screen without logging in
I have a python cron script. Switch on Raspberry Pi and when the login prompt appears, soon enough the script runs.
Is it possible for the script to "output" strings to this main screen without a ...
2
votes
1
answer
5k
views
Shutdown the Pi at the end of my python script using cron?
I have created a python script that lights up some leds on a bit of breadboard then it's supposed to shut down the pi, the script works fine if I run it in python and the pi shuts down as intended.
...
4
votes
4
answers
3k
views
Get Bash instead of /bin/sh in a VNC session started by cron
When I open a terminal (e.g. lxsession or xterm) in LXDE which is running in a VNC session the shell is
$ echo $SHELL
/bin/sh
However, I want my default shell which is /bin/bash to use my .bashrc ...
1
vote
1
answer
95
views
cron.daily midnight download
I run a headless Pi in a weather station using cellular data. Every night after midnight it does an 8MB download - I don't know what it is, but that's what vnstat tells me. Being as how the system ...
1
vote
1
answer
2k
views
Raspbian Jessie "wait for network" Vs. Cron @reboot entries
I have a few Raspbian cron entries that runs @reboot. Some are network dependent (i.e. ntp-wait).
My question is, with Raspbian Jessie, if "wait for network" is enabled in raspi-config, will cron run ...
3
votes
1
answer
2k
views
Launch Python script from Cron in foreground
I have developed a Python script that I would like to run at every boot of the Pi. The script in question is one that I do not want to run in the background. It will be controlling the display of ...
1
vote
2
answers
1k
views
Why is cron not showing a scheduled task when the cron file has the line shown below
I am new to Linux and experimenting with scheduling a task on a Raspberry Pi B. I can not get the scheduled task to run nor do I see the scheduled task when I use crontab -l. When I run crontab -l I ...
0
votes
1
answer
193
views
Raspberry pi, streamer + crontab + dropbox = catCamera, does not work!
I wrote a bash script that uses the dropbox app as per RaspiTV. I am using a standard USB webcam and streamer to capture videos of my cat when I am away from home with the hope that these can be ...
0
votes
2
answers
152
views
Bash video script stops working after a week
I am trying to create a series bash scripts to check on my dog when I am at work. I have cron jobs setup to run the scripts on the days I work, but after about 8 days the script stops working. I tried ...
2
votes
0
answers
205
views
I'm seeking a fancy slideshow feature
For our small non-profit canine training club I'm seeking a nice slideshow feature for a raspberry pi (v.3).
My plan is to create a USB-flash drive (stick) with the slideshow content. And if a USB-...
0
votes
1
answer
3k
views
why my script is not executed with root privileges using Crontab?
I have a working bash script and I want to run this script every minute with root privileges using crontab. I created my crontab as follows.
>sudo crontab -e
Then the file opened and I entered my ...
0
votes
1
answer
141
views
An avconv cron job fails
I am having trouble using a cron job in Raspbian Jessie to run a bash script that works fine when I run it manually on the command line.
I have read a few responses but the advice doesn't help,,, or ...
0
votes
2
answers
201
views
how to set up a cron job twice a day to save what was installed using sudo apt-get install to a text file
using this command I save all the sudo apt-get install to a text file:
history | grep "sudo apt-get install" | sed 's/^ *//' | cut -d' ' -f3- > ~files/packages/installed_on_raspberrypi.txt
how can ...
4
votes
1
answer
8k
views
systemctl daemon-reload issue
Since a last update, I get the follow message every day via mail:
/etc/cron.daily/logrotate:
Warning: Unit file of apache2.service changed on disk, 'systemctl daemon-reload' recommended.
I tried ...
2
votes
1
answer
990
views
Brand-new 32GB flash drive unmounts randomly, in an matter of minutes
I purchased a new flash drive, and mounted it to my pi in two steps:
Step one: Get the drive ID:
ls -l /dev/disk/by-uuid/
Result:
total 0
lrwxrwxrwx 1 root root 15 Sep 22 22:17 04DC-AE7F -&...
1
vote
0
answers
2k
views
Start NGINX Server at Login?
I have an NGINX server (used for RTMP) installed on a Raspberry Pi3 running the latest version of Raspbian (as of this writing). I would like to have the NGINX server start automatically when the Pi ...
1
vote
1
answer
476
views
Cronjob to send temperature alert via SMS
I am doing a small project on my RPi. I already created a website that shows the temperature. The temperature is updated every minute with a cronjob and stored in a .txt file.
Now I want to be ...
0
votes
2
answers
582
views
Cron job not running ruby script
I have a cron job running a ruby script, here is crontab
* * * * * /usr/bin/ruby /home/pi/runbot.rb
permissions look like this
pi@pi $ ls -l runbot.rb
-rwxr-xr-x 1 pi pi 859 Aug 26 14:16 runbot.rb
...
5
votes
2
answers
7k
views
How to automatically run a Python GPIO script at boot?
I am using Raspbian.
I have created a Python GPIO script which is supposed to run at the time of the boot.
I have tried to use @reboot in sudo crontab -e. Unfortunately, it is not working at all. I ...
3
votes
2
answers
7k
views
Cron jobs and python scripts
On Raspbian, I created a crontab file using the following command:
sudo crontab -e
Added the following lines to cron
@reboot /usr/bin/python3 /home/pi/dev/bootscripts/ipchecker/ipchecker.py
0 * * * *...
3
votes
3
answers
4k
views
Code/Cron to detect low power and safe shutdown on GPIO
I've made a portable wildlife camera which uses a 8 x AA UBEC battery pack and I am looking for a way to safely shut down the RPi when the power starts to get low. Is there currently any code that I ...
2
votes
2
answers
6k
views
Running shell script in cron
I am using ubuntu in rapsberry pi 2. I want my script to be ran after I login because it is a GUI program. I have tried to edit /etc/profile and it runs the program before enter the desktop so it ...
-1
votes
1
answer
63
views
Why crontab choose to execute one of the command over other?
So, basically I am using wiringPI library and its sample code for ds1302 chip. It works great by the way - writing and reading to and from ds1302 chip is a breeze. I can initiate PI's date and time ...
0
votes
1
answer
204
views
Raspberry Cron don't work [duplicate]
Every 15 minutes, I need to run a PHP script. So I created a execute.sh file containing this line:
#!/bin/sh
php execute.php >> twitter.log
When I run the script manually, it works. Oddly, ...
0
votes
3
answers
3k
views
Launch python file and run continually at start up and reboot
I cannot seem to get any of the options out there to work. I am trying to auto start a py file when the Raspberry Pi boots up. I need it to stay open and running continuously as it detects knock ...
0
votes
1
answer
767
views
Crontab does not execute python script [duplicate]
I have a DSB18B20 temperature sensor and would like to log the readings in a csv file.
I have a script templog.py that stores the readings in a file. The file starts with #!/usr/bin/python That works....
4
votes
3
answers
5k
views
Crontab on Rpi not running Python script
I have a simple problem that I cannot seem to find an answer to even though I have done some research. I am trying to run a python script via crontab (I have never worked with crontab before this haha)...
1
vote
0
answers
54
views
Crontab inexplicably restored to default
I have a Raspberry Pi 2 model B running Raspbian GNU/Linux 7 (wheezy). It has been running flawlessly for months and does a bunch of cronjobs. A few run every minute. Some run Once or twice a day. ...
-3
votes
1
answer
2k
views
FTP file upload [closed]
What cron settings send local file (/home/pi/file.txt) upload via vsftpd (ftp://server/file.txt)?
I am using a Rapsberry Pi 3 with raspbian jessie, apache, mysql, php5, vsftpd.
0
votes
3
answers
191
views
Cron not call sh script [closed]
Works:
crontab -e
* * * * * date >> /home/pi/scripts/test.log
Doesn't Work:
crontab -e
* * * * * /home/pi/scripts/test.sh
test.sh
#!/bin/hash
* * * * * date >> /home/pi/...
0
votes
2
answers
3k
views
Raspberry Pi randomly crashes due to python script
I asked this question in January here on the platform and thought that the reason for my Pi crashing was the raspistill script I used. This turned out to be a false positive.
After some hassle and ...
1
vote
2
answers
3k
views
Apache web-server interface to schedule GPIO tasks
So, here is what I am looking to accomplish. I have a Pi with an Apache webserver running with a home automation page. I also have a relay board and multiple lights hooked up, (using the GPIO pins on ...
0
votes
3
answers
7k
views
Raspbian jessie - cronjob doesn`t work
I know there are aready many questions about this topic, but no answer could solve my problem.
I use a Raspberry Pi B+ with the operating System Raspbian Jessie.
The Raspberry is said to synchronize ...
5
votes
1
answer
7k
views
Cronjob is set to run every 5 minutes but runs every minute
I have a problem with my python script. It looks like this:
#!/usr/bin/python
import time
import serial
import datetime
import sys
Y = datetime.datetime.now().strftime('%Y')[3]
filedate = datetime....
2
votes
0
answers
100
views
Game Server Lag Every 2 Minutes or So on Raspi 2
I run a DarkPlaces Quake server on my Raspberry Pi 2. Every 2 minutes or so, there is a massive lag spike in game play, but it's fine when it's not doing that. I have checked crontab, but neither my ...
1
vote
1
answer
1k
views
Cron Job running, but python script not executing on my RPi
I'm having a bit of problem with my cron job on my RaspberryPi.
It's a python script requesting json data from a bitcoin exchange, and packing them into a tarball.
When executing the script from ...
3
votes
3
answers
1k
views
When to call script that can capture IP in python
I'm trying to show my local IP on an LCD during startup.
My script worked fine during normal testing via the command line, but when called at startup it doesn't seem to be able to fetch the IP.
I ...
1
vote
2
answers
2k
views
Using Wiringpi in crontab to control GPIO pins on RaspberryPi
I am trying to create a cronjob, which sets the GPIO pin 10 to high at a given time. I am using the crontab of the default user "pi" and have verified, that the command
gpio -g write 10 1
works ...
2
votes
1
answer
22k
views
Where is the cronfile located? [closed]
I am writing a python program to go on the raspberry pi. I am currently making an installation script that will as part of its installation process, add a line on cron so that it will automatically ...