Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
2answers
36 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
21 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
45 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
39 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 ...
1
vote
2answers
91 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
0answers
20 views

automated way to restart a bitcoin node occasionally

Is there a way to reboot a bitcoin node occasionally (maybe once a day) in an automated way? Basically some way to Gracefully shut down bitcoind (i.e. wait for it to shut down completely). Reboot ...
0
votes
1answer
48 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
75 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
34 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
54 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
134 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
33 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
53 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
44 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
36 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
47 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
53 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
30 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
46 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
112 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
95 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
689 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
103 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
45 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
436 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
271 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
26 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
65 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
320 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
172 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
344 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 ...
0
votes
0answers
87 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 ...
0
votes
1answer
259 views

`crontab` fails to run Python3 code at boot (no GUI involved)

After searching for some time- I can;t find the reason that my python3 code won't execute during boot. I'm using Rpi Zero, using StrechLite OS. Code run OK when is executed from command line. crontab ...
3
votes
1answer
463 views

logging data when using crontab

Edits: added comments to code. I am running a small .py script on my Raspberry Pi with a DHT11 sensor and 3 LEDs. I am starting the program on boot with crontab, and everything is running fine apart ...
1
vote
2answers
81 views

Cron and atd jobs cant see manually mounted file systems (mounted while on ssh) [closed]

I recently upgraded to debian [/raspbian] buster. Ever since then, cron jobs creating directories using mkdir -p <directory name> will create the directory on the root file system / device ...
1
vote
1answer
268 views

Launch tightvncserver at reboot using cron

Starting tightvncserver manually from a terminal works fine. To start it @reboot I am using crontab -e with the following command: @reboot sleep 20 && /usr/bin/tightvncserver The path is ...
1
vote
1answer
325 views

Stop an automated task with cron?

I am trying to run a python script overnight on a Raspberry Pi, starting at 1900 and finishing at 0700, which scans the environment around the machine for MAC addresses of nearby devices for security ...
0
votes
1answer
48 views

Crontab not wrote into schedule after reboot and always restore to a specific time

I have a tiny computer, raspberry. It's a good computer. Recently, I got a problem when it run crontab and the problem is as this title. Otherwise, the system is always to restore. After editing ...
1
vote
1answer
45 views

Failing to record audio using cron

I'm not having any success getting the below line to run in Cron. I've added / before % due to it being a special character. It works without the / when run directly from Terminal. Eventually I'd ...
4
votes
1answer
202 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 &...
0
votes
1answer
644 views

Trying to autorun Paho MQTT client script on boot up

I am running a Paho MQTT client on my raspberry pi (Stretch OS). This script recieves MQTT messages from a publisher script and then stores the data in a SQL database. As I added client.loop_forever() ...
0
votes
0answers
243 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 ...
2
votes
0answers
790 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 ...
2
votes
1answer
863 views

Editing crontab within python

I have a RPi 3 running Raspbian Stretch. My plan is to write a Python program to control a 4-relay module to switch lights on and off at predetermined times. I’ve used tkinter to create a UI to ...
0
votes
3answers
243 views

Crontab or cron.d to run a wav file. What am I doing wrong?

I have been at this for a month now. New to programming. Trying to run a schedule for wav files to execute. Using Raspberry Pi 3 and Raspbian Stretch. My cron.d file called 'BellCron' is as ...
2
votes
3answers
2k views

How do I create a cron job to execute PHP?

I've been trying to execute a PHP file via a cron job, but I can't seem to get it to work. I've set the permissions of the relevant file to 777. Here is the line I've currently got in the crontab file....
0
votes
1answer
134 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
1answer
92 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 ...
0
votes
1answer
3k views

Unable to run `@reboot` crontab at reboot

I am trying to run two Python programs at reboot with my Raspberry Pi 3. The problem is that crontab doesn't run at reboot. I tried to run the programs with crontab every 5 minutes and everything ...
1
vote
2answers
568 views

Run two Python programs every 30 minutes

I have two Python 2.7 programs. When I boot the Raspberry Pi I want to run that programs automatically. I also want to very 30 minutes close that programs and run them again. I imagine that the best ...