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.

Filter by
Sorted by
Tagged with
1
vote
3answers
38 views

chromium-browser --headless 'errors' stopping script in Crontab

I have a script that works out the version number of todays Guardian crossword and makes the url address that I want to print from (I can wget a pdf and print that, but I (well my wife) prefers the ...
6
votes
1answer
80 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 ...
1
vote
1answer
29 views

Cronjob does nothing?

Does anyone know about crontabs here? I've programmed a fine dust station with values ​​acquisition, LCD display and so on. The particulate matter station is to be exhibited at the university, but ...
0
votes
0answers
22 views

Start python server and Vue front end at boot

I'm trying to have my raspberry pi start a python server with connected Vue.js frontend at startup. Right now i'm using crontab with the following configuration: @reboot sh /home/pi/Desktop/server-...
2
votes
1answer
29 views

Why no result from os.popen() when script is run from crontab?

When I run this Python3 script from the command line or from Thonny I get correct results. When I run it through crontab the variables ipaddress an ssid stay empty. Can anyone tell me why? Any ...
2
votes
1answer
75 views

Run turn off/on HDMI on specific time

I want to do the following: Use my raspberry pi as a smart display, kind off like what the Chromecast does when it's not streaming anything. I also want it to turn on and off at certain times, like ...
1
vote
1answer
45 views

Play a defined set of MP3's on defined days

am new to Python and have been struggling to create a workable script for a friends project - am hoping someone can point me in the right direction! The script is to control playback of mp3 files ...
0
votes
1answer
191 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,...
1
vote
2answers
67 views

@reboot with crontab, what am I doing wrong?

I have an .sh file located at '/home/pi/startup.sh' which I want to have running soon after bootup. I have my crontab with the following information. # m h dom mon dow user        command 17 *        ...
0
votes
2answers
130 views

Tinkering with environment variables

i want to run my pi headless, and only wire up some switches via gpio to operate it. i want it to monitor 3 switches, and tell if theyre high or low, and react accordingly. it should be launched every ...
1
vote
2answers
338 views

cron not executing python3

I am running Raspbian Stretch and have a python 3 script that executes correctly when I am in the relevant directory and input it in the command line as: sudo python3 Example.py The shebang #! line ...
1
vote
1answer
64 views

Call chromium within a Python script in crontab

I'm doing a digital signage project for a marketing agency that I work for. I have a Python Script that when called manually in Shell does everything, log and then opens Chromium. But when It starts ...
0
votes
3answers
182 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
2answers
73 views

Restart Pi after ping failure?

I have been creating a prototype using Pi Zeros, they work great at my house but are failing often at customer's site (other side of country). I do not know if the Pi kernel is crashing or if it's ...
1
vote
1answer
181 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 ...
-1
votes
1answer
164 views

Unable to run python script on boot

I wrote a script for object detection and if I establish ssh connection to Raspberry Pi and run it from console, everything works fine. As I would like to start the script automatically on boot, I ...
0
votes
0answers
16 views

Crontab jobs wont save on RPI with Xfce4 (no goodies) installed

I have a raspberry pi with the minimal image of Raspbian running the goodie-less version of XFCE4. After install my neccessary packages I have created a user named screenagent who is logged in ...
1
vote
2answers
45 views

Cronjobs sometimes fail to run fully when launching many Python scripts

I have about 30 Python scripts that I have scheduled to run via cron. Usually, I can run cronjobs on a Raspberry Pi just fine but I usually also only do a handful only. These scripts are essentially ...
1
vote
0answers
87 views

Script runs in terminal, but not in cron?

I have a script that runs OK in a terminal, but it doesn't run in cron. I've spent the last 5 hours on google and I'm not getting anywhere with it. The main code is as follows: import os import ...
0
votes
1answer
58 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/...
2
votes
2answers
889 views

How to stop python script that was started with crontab reboot

I have a python script that continuously saves data to a CSV file and is started as soon as the Pi starts up using crontab reboot. Does anyone know how I stop the script from within the Raspberry Pi ...
1
vote
1answer
34 views

Cronjob is missing the GET parameter in Raspberry Pi

I am using a headless raspbian OS on Raspverry Pi 3B+. I have placed the following code at the home directory of the user pi #!/usr/bin/env python import socket import httplib s = socket.socket(...
0
votes
1answer
221 views

Reinstall Raspbian without wiping SD card

I recently upgraded my pi3 using apt. After a number of packages were upgraded, cron stopped working. Instead of executing its jobs, cron now drops a message in /var/log/daemon.log: Oct 29 19:40:01 ...
0
votes
1answer
279 views

Schedule a cron job to send temperature via e-mail

Greeting's, I am running an apache2 server on my raspberry pi. I wanted to keep a tab on it's temperature while I'm travelling. I know that following two commands will give me the GPU and CPU ...
2
votes
2answers
833 views

Execute a script at sunrise/sunset

Good afternoon, I'm trying to edit by soft, as a text file, the file that contains the crontab data. This is because I need to execute a series of functions daily, they are related to the sunrise and ...
0
votes
1answer
305 views

Automatic startup browser

I have a script that starts iceweasel with a certain webpage if iceweasel is not already running. It should start iceweasel on the local screen, in other words the screen plugged directly into the ...
1
vote
2answers
97 views

crontab schedule .py file

I am attempting to run a scheduled .py file every 5 minutes with crontab but I don't think it's working. I'm following this post with the instructions: Can't run python script from cron I opened ...
2
votes
1answer
36 views

Cronjob deleted but cron still sends email

I have in /etc/crontab a job defined like this: 0,10,20,30,40,50 * * * * root /usr/lib/cgi-bin/awstats.pl -config=example.com -update I deleted this job but cron sends me still emails every ten ...
1
vote
1answer
344 views

Python script not running when added to crontab

I have an on_reboot.sh file that contains the following: #!/bin/bash source /home/pi/.profile workon cv cd /home/pi/reboot python pi_test.py After that I made the file executable using $ chmod +x ...
0
votes
1answer
508 views

How to run a script which uses I/O's on startup?

I have a python script which makes use of the standard RPi I/O's where I am detecting multiple inputs and storing values to a database. The script runs without exiting until the Pi is powered off. ...
1
vote
1answer
43 views

YA Cron Question

I have a python script called mediacircus.py that works when run manually (using Idle) in /home/pi. I have a Cron schedule to run it every minute that looks like this: * * * * * /usr/bin/python /home/...
1
vote
2answers
102 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
3answers
85 views

Crontab Unresponsive

I am trying to get my Raspberry Pi B+ to run a shell script everyday at the same time, and I am trying to use Crontab to do it. I run sudo crontab -e to access my Crontab programs, and added the entry ...
1
vote
2answers
55 views

Automatically launching a script after full boot [duplicate]

New here and know that launching programs is a well discussed topic, but I've got a slightly different need that I think is complicating the solution. I've got a straight forward python script that ...
0
votes
1answer
68 views

Cron Job turns off the matrix MAX7219 after finishing the script

I have a script in python3 which executes and shows information in an 8x8 MAX7219 matrix and works perfectly. When I run the script directly from the .py file, the matrix does not turn off (and that's ...
0
votes
0answers
215 views

Xdotool not working in Crontab

My main goal was to make a basic shell script that would close down my chromium tabs before shutting down. This was my script: xdotool key ctrl+w & sleep 15; sudo shutdown -h now After changing ...
0
votes
1answer
47 views

How can I disable Cron jobs from Windows?

My friend thought it would be funny to make a Cron job on my pi that made it shutdown every minute, so now it boots and immediately shuts down. Can I delete the file with the Cron job from a windows ...
1
vote
2answers
51 views

Skip first job run at reboot with Cron

I'm trying to run a Bash script with Cron every 5 minutes to check if my Raspberry Pi have changed its IP address or not and update me, this is the script i'm using. #!/bin/bash #check and send ip ...
1
vote
2answers
280 views

What's wrong with this little python script?

I followed this tutorial to log my CPU temperature into a .csv-file and try to run the .py script it at bootup with cron. The script: from gpiozero import CPUTemperature from time import sleep, ...
0
votes
1answer
375 views

How to run a C program at boot time [duplicate]

I have a project and it is running a c program on the PI. The program is meant to start running at startup. So far I have tried to do this with rclocal, but this is depricated. Afterwards I tried ...
0
votes
1answer
1k views

Cron vs. Python ‘schedule’ for scheduling tasks with Flask

I’m looking to implement a script that calls a web API at regular intervals (e.g. every hour). I’m using Flask as my server. Should I use the Cron framework, or is it better to use Python’s schedule ...
4
votes
3answers
258 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 ...
0
votes
0answers
58 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 ...
5
votes
3answers
638 views

Is it necessary to release Raspberry Pi Camera before rebooting? If so how do I do it?

I have a python3 script that uses OpenCV and a Raspberry Pi cam. It runs almost 24/7. Using crontab the pi will reboot every night at midnight and the script will begin running again. This is mostly ...
0
votes
2answers
655 views

Raspbian 04-18 Cronjob won't run with @reboot

I'm trying to find any solution to this problem but for some reason I can't manage to make this work properly. The only thing I need is to run a .sh file located in the /home/pi folder. I did it like ...
0
votes
1answer
67 views

How to wait for X-Server to init before crontab

Kindly refer to my problem at: crontab @reboot starting an UI Application I tried to use sleep in my script. It won't work. May I know how can I wait for X to start before running my crontab? Many ...
0
votes
0answers
104 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
1answer
583 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
1answer
235 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
1answer
731 views

Cron jobs not running when specific time specified

I have a crontab that looks like this: * * * * * /bin/date >> /tmp/every-minute.log 0 8 * * * /bin/date >> /tmp/eight-am.log The first line works just fine. The second does not seem to fire at ...