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
0 votes
2 answers
33 views

Can't get Cron to run python script

I'm trying to set up porkbun dynamic dns python script to run at reboot via Cron (later I'd like to run it hourly, but baby steps...) following porkbun's tutorial https://www.youtube.com/watch?v=...
user avatar
  • 1
0 votes
0 answers
15 views

Give ssh deamon higher priority than CPU-hogging process

I've got a web scraper running every 30 minutes via a cronjob. The web scraper is working well, but I'm now struggling to ssh in (I don't have any monitor hooked up to it so ssh is the only way I can ...
user avatar
1 vote
0 answers
44 views

How can I get my python program that uses the requests library to run on boot via the crontab

I am working on creating a python script to retrieve data from a server using the requests library, and then display it on an adafruit led matrix using a raspberry pi. I have a program that functions ...
user avatar
  • 11
2 votes
3 answers
88 views

Cannot SSH into periphery RPis from master RPi using python script automated from crontab: Host key verification failed

Project Overview I have a series of RPi 3B+ which collect T/RH data using connected sensors. These "periphery" units collect data every 5 minutes, append the data to a CSV file that holds a ...
user avatar
0 votes
1 answer
435 views

How to run libcamera-still in python trough crontab?

I'm trying to make a time lapse using crontab to manage time intervals. The camera I use is an arducam Autofocus imx519. The libcamera-still command works normally when run via terminal. But when I ...
user avatar
1 vote
2 answers
74 views

Crontab can't create logs (Permission Denied)

I have a script that I want to run every hour, and the echo's of that script and other output, I want to be able to read. Now when I take a look at /var/log/syslog, I see some weird stuff that I can't ...
user avatar
0 votes
2 answers
60 views

Cronjob Raspberry Pi not working

I am trying to use my raspi to host a discord bot that every morning publishes the food in my school. I have setup a bronjob with crontab -e but it's not working. Crontab lookis like this: 45 07 * 2-5 ...
user avatar
0 votes
1 answer
34 views

BLE cannot scan after cloning Raspberry Pi 3

I have raspberry-pi 2 and i made a python program. My python program can detect BLE and send scan results using MQTT. The program will run automatically when restarted [Using cron-table]. Then I did ...
user avatar
1 vote
0 answers
29 views

why won't my raspberry pi python program run at boot up? [duplicate]

i have recently bought a raspberry pi 4 module b to be able to run programs 24/7. but sometimes my power/electricity can go out at which then makes the program stop working. i tested my program in the ...
user avatar
0 votes
1 answer
120 views

Rotate display on startup

I try to rotate my display on startup. (Console, NOT X11) I do not really care if this happens before the bootup-sequence or afterwards. As long as the display is rotated once the login-prompt appears ...
user avatar
0 votes
0 answers
83 views

Start mono application on startup

This is my first time using a linux/rasbperry pie and I am trying to start a program I made in c# on my windows on startup. It has a graphical user interface, and can run from the command line using ...
user avatar
1 vote
1 answer
56 views

.service or crontab for shell script calling python-CLI app and/or python script failing

This isn't necessarily a Pi-specific question, but might be applicable to general Linux. However, my hunch is that the Pi's uniqueness might have something to do with it. I'm trying to run two scripts ...
user avatar
  • 113
0 votes
1 answer
46 views

Mqtt driven python servers not working when launched by crontab -e / @reboot

I have programmed in Python several mqtt driven servers on a Raspberry Pi W (with Buster) to execute a set of commands when receiving a given set of mqtt messages from the mqtt broker (after ...
user avatar
  • 11
0 votes
3 answers
424 views

How to run a script (pointing to a python file) with root permission at startup in Raspberry Pi OS?

I am trying to run a script which ultimately runs a pagekite python file. The Pagekite offers tunnelling service for localhost to be publicly accessible. My aim is to run the pagekite.py when the Pi ...
user avatar
0 votes
1 answer
48 views

Bash script wont run under sudo crontab but will under pi crontab

I have a simple script start_chromium.sh: #!/bin/bash DISPLAY=:0 chromium-browser --start-fullscreen --kiosk http://server:8080 When I do sudo crontab -e and add @reboot /home/pi/start_chromium.sh ...
user avatar
0 votes
0 answers
56 views

Not Able to Change Volume with Cron (tried Python)

Alright, I've been trying this for several days and I'm just dying here... I am putting together a kiosk that should play video. I'm using a NUC with Raspberry Pi Desktop. Everything works but ...
user avatar
-1 votes
3 answers
208 views

Cannot run a script after reboot using Cron

I'm trying to start a script containing cgminer for mining when the raspberry pi reboots however it doesn't. My crontab contains the following. @reboot sleep 120 && sudo /home/pi/StartVPN.sh @...
user avatar
0 votes
2 answers
44 views

python code to read SMS not working when running under cron

I made a python code to read SMS from SIM800 module, that is connected to a Raspberry Pi Zero W, and it is working like a charm when I run it on a terminal or another IDE. Here is the expected result: ...
user avatar
0 votes
1 answer
332 views

Restart lxpanel through shell script; works in shell, but not in cron [closed]

I have a raspberry pi which stays on for extended period of time. To avoid it from crashing, I have a cron job that periodically checks for top memory consuming apps and then restarts them as needed. ...
user avatar
  • 3
2 votes
1 answer
432 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 ...
user avatar
0 votes
1 answer
798 views

Cron python job not running

I tried to automate the launch of a python script. After having tested it works in thonny, I moved to Cron and I got quite lost. I started from calling 12 21 * * * /usr/bin/python3 /home/pi/main.py to ...
user avatar
  • 1
0 votes
2 answers
676 views

How to schedule the power on / power off of a Raspberry

What are the solutions to locally schedule the power on / power off of a Raspberry (power on at 8 am and power off at 8 pm) ? I was asked to do so by the person in charge of my project. I told him it ...
user avatar
0 votes
1 answer
207 views

Crontab does not work

I am trying to run either at boot or at intervals of 5 min (everytime basically) a command that enables me to use my remote control. Thus sudo crontab -e -u root, I add in crontab the following line: *...
user avatar
0 votes
1 answer
33 views

Cronjob does not work anymore after copying it

I recently reinstalled my Raspberry Pi after I changed the microSD-Card. I copied all my crons manually (in /var/spool/cron/crontabs/) and after I imported them with root on my new installation, they ...
user avatar
1 vote
1 answer
445 views

arecord no such file or directory error when running via cron

So I can run: arecord -d 9 -f S16_LE -c 1 -r44100 -t wav /home/pi/signal_9s.wav from terminal and it works as expected. It records for 9 seconds and saves to the signal_9s.wav file. However if I set ...
user avatar
0 votes
1 answer
183 views

Cron job not working on python script for power monitoring - HS110

I have cobbled together a script which runs as a standalone python file. It successfully connects to the HS110 smart plug from Kasa/TPLINK and posts the power in Watts to my webserver. This all works. ...
user avatar
-1 votes
2 answers
231 views

Problem with crontab -e. Does not saving photos using autorun

Does not save photos using auto-launch in crontab. I use Python 3 or raspistill, they work well for photos when a monitor is connected. #!/usr/bin/python3 # BEFORE USING THIS SCRIPT. # ...
user avatar
-2 votes
1 answer
469 views

Crontab Permission Denied running simple Python Script

I've been trying to get this to work for DAYS. Its doing my head in because everything i search suggests this work. The process is Cron executes bash which executes python I open and edit the cron ...
user avatar
0 votes
2 answers
97 views

Using shell with cron

I have an app controlling a piece of connected hardware that displays a few lines of info and requires user input (on stdio). The app runs fine from a shell. I set up the RPi to auto-login with CLI ...
user avatar
0 votes
2 answers
123 views

Crontab runs but nothing happens [closed]

I want to run a script daily with Crontab, then, I added that line: 30 1 * * * /usr/bin/python3 /home/pi/.../uploadFiles.py >/dev/null 2>&1 If I copy and past the line /usr/bin/python3 /...
user avatar
0 votes
3 answers
428 views

How to schedule turning off and on of a pi4 using cron?

How to schedule turn off and on of a pi4 using cron ? Hello, to save power I wanted to schedule precisely when my RPI has to be turned on and off. I think Cron was a good solution so I try to edit ...
user avatar
0 votes
1 answer
927 views

Raspberry pi crontab won't restart service

I have a raspberry pi that is running an outdoor camera. Occasionally, the camera 'locks' and I have to restart the service as root and it starts working again. Since the camera is outside it's in a ...
user avatar
1 vote
1 answer
101 views

exim4/mail Usage Question

I have a bash script (daily.sh) that runs daily as a cron job for user pi. Recently, I received an email notification on my RPi that an error had occurred in daily.sh. It turned out that this email ...
user avatar
  • 18.2k
0 votes
0 answers
146 views

wget command in sudo crontab

On my RPi Buster I am using sudo crontab -e to get image from http page: */1 * * * * /usr/bin/wget -b http://lutov.radionet.sk/phpmyadmin/inovec.jpeg -O /var/www/html/wp-content/uploads/inovec.jpeg -o ...
user avatar
  • 9
0 votes
2 answers
249 views

Execute A Jupyter notebook file using runipy -o myfile.ipynb command upon Raspberry PI 4(Raspbian OS) boot-up

My research regarding this issue: All methods available on the internet are about running .py files on Raspberry Pi boot. NO ACTUAL HELP ABOUT RUNNING JUPYTER NOTEBOOK FILES .ipynb ON RASPBERRY BOOT ...
user avatar
1 vote
1 answer
80 views

gallery-dl script doesn't work with crontab or rc.local but works manualy

I wrote a simple script that cycles through a file and grabs some links from a file to run through a program called gallery-dl. This script works fine if i run it manually but just wont work with ...
user avatar
0 votes
1 answer
38 views

code does not run off @reboot tag

Not sure where the issue is but my code doesnt run correcrtly when its in a cron. This is in my cron.d: SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin @reboot pi /home/...
user avatar
  • 101
2 votes
2 answers
822 views

Unable to edit cronjob, /tmp is read-only

I am trying to make my raspberry pi automatically restart every week. But I am unable to create the cronjob as I get a error message that the temporary crontab file was unable to be created. /home/pi $...
user avatar
6 votes
5 answers
2k views

Is there a way to remove old files without relying on internet time service?

I have a Raspberry Pi that is acting as a sensor which I am sending out to various customers. The sensor is recording approximately 1 GB every 2-3 days, so I would like to have a way to remove old ...
user avatar
0 votes
1 answer
125 views

CRON service shebang

For CRON schedule that I am trying to run a .py file... Does the shebang at the top of a .py file need to state the version of python? #!/usr/bin/env python If I need Python 3, should this be: #!/usr/...
user avatar
  • 205
2 votes
2 answers
264 views

Can't run python script on startup. Raspberry Pi 4

I am trying to run a python script when my Raspberry pi 4 boots. THis python script works when I run it directly, with no errors. I have edited the crontab file to do this as can be seen below: # ...
user avatar
0 votes
1 answer
189 views

CRON schedule to run a .py file [closed]

Im trying to follow this blog about setting up a CRON service to run a .py file every 15 mintes In the blog it states to place your .py file in the /home directory and then make sure you can execute ...
user avatar
  • 205
0 votes
2 answers
461 views

CRON vs While loop [closed]

I have a Twitter bot that checks for new tweets every 60 seconds... Would setting up CRON to run the script every minute be better than putting the script in a (24/7) while true loop with sleep(60), ...
user avatar
  • 11
2 votes
5 answers
2k views

Why is cron needed for Raspbian?

I was looking for some sort of process that is lagging my device. While searching I found that cron is running. If I understand this correctly then cron is needed to run serials of command at a ...
user avatar
  • 1,660
0 votes
0 answers
35 views

imapclient is working fine when I run it by hand but not when I run it using cron

Currently, I have a python program where my pi will check if a certain email address has a certain email and then run another piece of code. When I run the script normally there is no issue with it, ...
user avatar
1 vote
1 answer
79 views

Python script refuses to start automatically

I have a python script (taken from the forums here) that reboots my RPI when a button is pressed. It works great, no issues, except that it refuses to start automatically (either on boot, login, ...
user avatar
  • 143
2 votes
0 answers
333 views

Raspberry Pi stops running cron job after a few hours

My raspberry pi 4 is set to run a python script every hour that turns on some philips hue lights and takes a picture with the camera module. It worked perfectly for 26 days, then it stopped running. ...
user avatar
  • 21
1 vote
1 answer
276 views

Parts of code not running when autostarting script in crontab

I am getting some really strange behavior when trying to run a python script at start up using an sh script in crontab. Here is the python script (it controls wifi lights in my house): #IMPORTS from ...
user avatar
2 votes
1 answer
287 views

Raspberry Pi in forever reboot loop crontab

I was trying to setup my raspberry pi in crontab to reboot every time at midnight, it didn't work, So I set it to run the command every minute, didn't work, so I put sudo in front of reboot, now I ...
user avatar
  • 123
0 votes
2 answers
243 views

Global variable environment not read crontab - webmin

In my program, I retrieve a value from a global variable if I run a program in the python console everything works, I defined the global variable as follows: export GOOGLE_APPLICATION_CREDENTIALS = /...
user avatar

1
2 3 4 5