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.

41 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
1 answer
690 views

crontab entry with parameters?

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 &...
YakovL's user avatar
  • 159
3 votes
0 answers
2k views

Script not working with crontab, works manually

I have a problem with a script not working when executed via crontab. I've already searched for similar problems, but none of the usual solutions seem to work. I'm using a RPi3 with raspbian stretch ...
Chris's user avatar
  • 31
2 votes
0 answers
51 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 ...
ho88it's user avatar
  • 31
2 votes
0 answers
456 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. ...
John's user avatar
  • 21
2 votes
0 answers
176 views

Crontab + LCD display strange behavior

I have my Raspberry Pi hooked up to 16 x 2 character display the date on launch. The display has a i2c module on the I have placed this in crontab (without the sudo thingy, so user) : @reboot ...
Ben's user avatar
  • 115
2 votes
0 answers
204 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-...
user3903786's user avatar
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 ...
SpecialBomb's user avatar
2 votes
0 answers
413 views

cron scheduler not starting

I have a few cron entries for root and for a regular user ,but sometimes after rebooting cron stops working completely. pgrep cron returns nothing. Running crontab -e fixes this but I can't do that ...
littlecat's user avatar
1 vote
0 answers
212 views

Retain persistent Wi-Fi connection on Raspberry Pi

I have a Raspberry Pi that I need it to remain connected to my WiFi constantly (at least as soon as the WiFI becomes available). In practice, however, I have noticed that when there are problems with ...
Gouz's user avatar
  • 115
1 vote
0 answers
268 views

Fetch and pull git repo on boot

I have a cron job set up to run boot.sh on reboot, and log the input to debug.txt. @reboot cd /home/<user>/code/seasons-pixel-clock/ && (sudo bash boot.sh) > debug.txt The contents ...
JeremiahDuane's user avatar
1 vote
2 answers
220 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=...
APEX's user avatar
  • 11
1 vote
0 answers
154 views

Autorun Python script with Pyserial on Startup with Crontab

So I am looking to do something that I thought was simple.... I just have a script that imports and uses pyserial and I want it to run automatically when the pi is booted up. I have an LED rigged up ...
Timothy Barrett's user avatar
1 vote
0 answers
223 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 ...
agour's user avatar
  • 11
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 ...
Arne's user avatar
  • 2,226
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 ...
Question Asker's user avatar
1 vote
0 answers
53 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. ...
BryanK's user avatar
  • 275
1 vote
0 answers
423 views

Problem with my reboot-on-wifi-lost script

I have set up my raspberry pi as a small Webserver, connected to a WLAN-Hotspot. I set up a script I found on the internet to reboot the raspi once it looses internet connection or is not able to ping ...
qwertz's user avatar
  • 180
1 vote
0 answers
1k views

crontab not starting command on reboot

I need a command to run at reboot. This command is called script.sh #!/bin/bash ibeacon scan | /home/pi/test.py This command pipes input to a python program I wrote called test.py. #!/usr/bin/...
Thomas Hall's user avatar
1 vote
0 answers
653 views

cron jobs won't run after boot on linux arch

I'm trying to setup a cron on boot to run yet it doesn't seems like it's working( [root@alarmpi ~]# crontab -l @reboot /root/cgminer XXXXXXXXXX @daily `which pacman` --sync --refresh [root@...
alexus's user avatar
  • 327
0 votes
1 answer
22 views

No sound with mpg123 or mplayer at boot

What I want to do : at boot, start a playlist on a headless RBPi A+ through the headphones jack using mpg123. I Wrote a shell script targeting mpg123: #!/bin/bash # see if (and when) my script was run ...
catmembert's user avatar
0 votes
2 answers
32 views

Cronjob not executing when raspberry pi reboots

The following is the Python script that I want to execute every time Raspberry Pi reboots. When I run this Python script directly from the terminal it works. Not only does IP gets stored in the file ...
Osama Khalid's user avatar
0 votes
0 answers
100 views

Raspberry Pi 3B+ freezes on cron reboot

I set up a cronjob on my Raspberry Pi 3B+ (1GB RAM) to reboot every morning, which worked fine for over a year. For three days, however, the RPi has been crashing immediately after reboot. By “...
Pixelcode's user avatar
  • 101
0 votes
0 answers
69 views

crontab fails in fresh installation

looking for quick answer. Fresh install of RPi, installed a couple of libraries to support my code. ran code successfully. Tried to create a bootstrap using crontab to automatically load and run my ...
Roger Mckee's user avatar
0 votes
0 answers
271 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 ...
Somecode's user avatar
0 votes
0 answers
75 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 ...
kstthomsen's user avatar
0 votes
0 answers
243 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 ...
miso k's user avatar
  • 9
0 votes
0 answers
55 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, ...
CaptainObi's user avatar
0 votes
0 answers
434 views

AutoStart Slideshow can't find pictures

I am trying to get Raspberry Pi to startup running a slideshow of various JPEGs on a USB stick I can get the shell (below) to run no problem from terminal I set crontab to execute the shell (shown ...
Larry Mackey's user avatar
0 votes
0 answers
142 views

How do I cron schedule a playlist shortcut on my desktop

How do I trigger a shortcut "My_Favourites.xspf" that lives on my desktop. I would like to start playing this playlist of music in the morning to wake me up. Just to explain better: When I double ...
user4742250's user avatar
0 votes
0 answers
574 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-...
John Doe's user avatar
  • 101
0 votes
0 answers
140 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 ...
DJ K's user avatar
  • 1
0 votes
0 answers
672 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 ...
Hector's user avatar
  • 1
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 ...
pb77's user avatar
  • 19
0 votes
0 answers
337 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 ...
s k's user avatar
  • 121
0 votes
0 answers
272 views

Crontab doesn't work after reboot by cable plugging out

I have a crontab task for python script (IOT hub by microsoft) launch. It launches properly after "sudo reboot" and by manual script launch, but doesn't launch properly after reboot by cable plugging ...
Alexander's user avatar
0 votes
0 answers
755 views

cron job not starting on bootup

I've created a cron job and it does seem to be running. This is the line I've put in cron file : @reboot python /home/pi/Pimoroni/bme680/Indoor-Air-Quality-MQTT.py & I ran the command grep CRON ...
resolver101's user avatar
0 votes
1 answer
497 views

Running ruby script with eventmanager on startup

I hope somebody can help me with the following. I need my Raspberry to run a ruby script on startup which uses ruby's eventmachine package. I've installed rvm, the correct ruby version (2.1.0-dev), ...
madmartigan's user avatar
-1 votes
1 answer
404 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 ...
Niko Gamulin's user avatar
-1 votes
1 answer
462 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 ...
Frank Bonham's user avatar
-1 votes
1 answer
884 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 /...
Frank Breitling's user avatar
-2 votes
1 answer
787 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 ...
Felixr2's user avatar