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.
36 questions
21
votes
2
answers
52k
views
Where do Cron error message go?
I have a python script running by cron. For what ever reason, it is not running. I am wondering if there is anywhere that error messages are sent? Script runs fine by itself. If I run a simple script ...
8
votes
4
answers
8k
views
Default shell for cron issue
I have some commands, they are working under bash, but not as cronjob. To see, what cause the problem, i'm saving the output in a file, here my example:
51 * * * * source ~/.rvm/scripts/rvm &...
1
vote
3
answers
5k
views
control motion via cron
If this site gives this as an example of controlling Motion via cron as:
0 9 * * * root /usr/bin/lwp-request http://localhost:8080/0/detection/start > /dev/null
1) is this the correct sintax to ...
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 ...
0
votes
2
answers
5k
views
Start and run a Python script at boot and use Cron to make sure its still alive
Hopefully someone can tell me if I'm going at this the right way.
I have a Python script which I want to launch at boot.
That was easy enough by putting a file in /etc/init.d/myBootFile
I want to ...
42
votes
2
answers
187k
views
Open chromium full screen on start up
I would like to set up a couple of Raspberry Pis to open automatically chromium or any other browser available to at start-up, and in full screen mode.
I was wondering if any of you can help me. ...
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
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 ...
23
votes
6
answers
69k
views
How do I reboot at a specific time?
Is it possible to re-boot my Raspberry Pi at midnight each night? I know in Linux, you'd use crontab, but I can't seem to find /etc/crontab.
7
votes
1
answer
7k
views
What's different about a crontab reboot?
I have a python script to log data from a USB weather station and present it via a flask front end. The USB on the pi (Pi2 model B) is flaky and occasionally hangs after 24-48 hours. The flask app ...
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 ...
5
votes
1
answer
709
views
crontab entry with parameters? [closed]
My goal was to make my Pi create its own WiFi on start so that I can connect to it wirelessly.
I have succeeded by creating a crontab entry (using sudo crontab -e):
@reboot /path/to/create_ap.sh &...
4
votes
3
answers
994
views
Python script run from crontab does not recognize USB drive mounted later
I am having a bit of a problem here, I really hope some of you can point me in the right direction:
I made a python3 program running a loop and checking if the file /DATALOGGER/DATALOGUSB/SETUP.py ...
3
votes
2
answers
742
views
Crontab not executing php scripts
My problem is that crontab is not executing my php script /home/pi/CronTabFiles/saveThermometer.php
I tried a lot of things, I don't remember everyone of them but I'll list what i consider mains one. ...
3
votes
1
answer
1k
views
Pygame.mixer does not play sound when started in cron
I have written a small python script that plays a track after the press of a button (and ignores further button presses until the track has completed). The script works perfectly fine when started ...
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 ...
2
votes
2
answers
2k
views
Cron for Raspberry Pi
I'm running a program on one of my PIs that has a tendency to error out. I'm still trying to figure out the error but would like a cron entry (or maybe a python script, or most likely both) that will ...
2
votes
1
answer
4k
views
Automatic shutdown of Pi based on timer
I'm looking to have my pi shutdown automatically based on a time interval (rather than the time of day). This is for an art installation and the reason I am turning off the pi is because it will ...
2
votes
1
answer
1k
views
What is the environment for cron?
When issues arise using cron to schedule events, a frequently-heard explanation is that cron runs with a different set of environment variables than a "normal" user (e.g. pi). That's all well and good,...
2
votes
4
answers
21k
views
Can't run python script from cron
Running latest version of Rasbian and want to execute /home/pi/temp.py from cron every 2 min. Have chmod 755 on the file
When I run the command from the prompt it executes fine and the script does ...
1
vote
1
answer
222
views
python script not launching when put into crontab
I have two python scripts, flickSwitch.py & measureTemp.py, the first calls the second when a button is pressed. All works fine when run directly from /home/pi.
I put the first script into ...
1
vote
3
answers
1k
views
script runs at terminal - but not in cron
I'm logged in as user pi via SSH and have a wifi checking script wifi_test_1.sh in the following directry: /usr/src/scripts/wifi_test_1.sh
When i enter the command /usr/src/scripts/wifi_test_1.sh ...
1
vote
1
answer
559
views
Jessie: How do I make cron create its own log file so it can be monitored in real time?
I know that cron events are stored in /var/log/syslog and I can use a command like:
sudo cat /var/log/syslog | grep cron
to see them.
I'd much rather have the system keep a separate cron log file ...
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
2
answers
199
views
Start Python CLI app on startup
I have a Raspberry Pi 3b+ that is booting to the pi user terminal, no GUI. I need to have a small CLI app run after the pi has finished booting.
So far I have tried editing /etc/rc.local, and using ...
0
votes
3
answers
1k
views
Running Script on Crontab but it doesn't access WiFi connection
I am running a script using crontab at reboot but somehow the part of the code where some file is being sent to a S3 bucket in AWS, doesn't work. I have included an initial wifi check in the same ...
0
votes
1
answer
2k
views
Autostart python script and see its output on the terminal
Is there any way that i can auto run a python script at boot and see its output on the terminal other than editing the .bashrc file ?
I tried using crontab job and putting myscript in /etc/init.d/ ...
0
votes
1
answer
493
views
Script Running in Background GPIO.cleanup() on shutdown
I have been searching for answer to this. I have python script that runs on start up via cron, and lights up some different LEDs based on button pushing using the GPIO pins and runs in the background ...
0
votes
0
answers
350
views
crontab @reboot starting an UI Application
I was able to do this until I downloaded the latest raspberry pi image.
It is a DotNET WinForm application.
Started in crontab using @reboot /home/pi/auto.sh
#!/bin/bash
cd /home/pi/test
export ...
0
votes
0
answers
117
views
Cron doesnt run specific .py file
I wrote a code in Python to change Bluetooth Low Energy information.
If I write for example python beacon.py 12 12 major of BLE advertised data will be 12 and minor will be 12. When I run it using ...
0
votes
1
answer
918
views
Cron not finding necessary files to run .py file
I hope this is not a duplicate post however I have spent about 16 hours researching a solution for my problem and have not found it yet. I am attempting to run a python GUI that acts as an interface ...
0
votes
3
answers
3k
views
Crontab suddenly doesn't start jobs
I'm suddenly having crontab issues, I didn't do anything other than change the script names and then change them in crontab as well so they all natch, the scripts work if I start them manually, so i'm ...
0
votes
1
answer
279
views
Command from terminal and script on startup
Is it possible to run a python script as well as a command from terminal on startup?
I have successfully executed the python script as mentioned in the link below.
https://www.instructables.com/id/...
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
2
answers
667
views
Can't get Python script to execute using crontab or initd or systemd or rc.local on raspberry pi
I have a working python 2.7 program that reads a temperature sensor and vibration sensor from the GPIO ports . I can execute it from both the Python environment and the command line. The program is ...
-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 /...