Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results for cron
Search options not deleted user 83790
7 votes
Accepted

Output fsck on boot to a log file

However, this may be ill-advised: the file /forcefsck is removed before booting is completed - which means you'll need to automate adding it (e.g. a cron @reboot job) following each reboot. …
Seamus's user avatar
  • 22.9k
6 votes

Run python script at specific date

Lots of online resources available for "hacking" cron: https://opensource.com/article/17/11/how-use-cron-linux https://en.wikipedia.org/wiki/Cron https://www.raspberrypi.org/documentation/linux/usage/ … cron.md http://www.unixgeeks.org/security/newbie/unix/cron-1.html …
Seamus's user avatar
  • 22.9k
6 votes

What's different about a crontab reboot?

As I understand your question: You have a cron job to reboot your RPi every night at 01:00; e.g. 0 1 * * * sudo reboot (#or something similar; e.g. shutdown -r now) You have a 2nd cron job to restart … your app using the @reboot facility in cron; e.g. …
Seamus's user avatar
  • 22.9k
6 votes
Accepted

Can I delete the "~/.cache" file?

I would use cron for that job. To employ cron, you only need to add a line to your crontab file. … You can learn more about using cron through a Google search, and by typing man cron and man crontab at the command line. Try this, and if you have specific questions, let us know. …
Seamus's user avatar
  • 22.9k
6 votes
Accepted

What is the environment for cron?

We can ask cron to tell us what its environment is. … Note also that the user name (aka LOGNAME iaw System V) isn't cron - it's pi! If you're not familiar, with your own user environment, it's useful to compare it against the cron environment. …
Seamus's user avatar
  • 22.9k
6 votes

Start Python Script on Startup

In general, there are two approaches: systemd and cron. This answer shows the cron approach. Your question shows the following : sudo python3 /home/pi/videotest.py &. … tries to execute this job cron will sleep for 10 seconds - this gives the system time to get its resources started after 10 seconds, cron will call python3 to run your script located at /home/pi/videotest.py …
Seamus's user avatar
  • 22.9k
5 votes
Accepted

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

You've run into a well-known limitation with cron. The question has been asked and answered here many times. … This recent example highlights the two (at least two) choices you have: use cron (older, simpler) use systemd (newer, more complex) The answer to your question in the context of cron usage is this: …
Seamus's user avatar
  • 22.9k
5 votes
Accepted

Automatic shutdown of Pi based on timer

When you run a command as a cron user, those error messages go "somewhere else", and you don't see them when the script execution is attempted. … It couldn't find it because the cron user has a different $PATH than you do as user pi. …
Seamus's user avatar
  • 22.9k
4 votes
Accepted

Cronjob is missing the GET parameter in Raspberry Pi

The explanation as to why cron operates this way, and alternatives to cron are verbose, but have all been documented in this forum. Fortunately, the simple solution is not complicated! … You must simply tell cron to wait a few seconds before it executes your script. …
Seamus's user avatar
  • 22.9k
4 votes

My script in autostart not work correctly

ANSWER # 3: In the meantime, there is a third alternative to starting your script at boot time: cron. …
Seamus's user avatar
  • 22.9k
4 votes

Crontab suddenly doesn't start jobs

However, your cron job does NOT run under your userid, and its stderr stream does NOT go to the screen. … However, cron is (IMHO) simpler, and inserting a sleep command in your crontab will usually resolve resource availability issues. …
Seamus's user avatar
  • 22.9k
4 votes
Accepted

How to run a program on boot, but not user login?

"Somewhere else" could be cron - under a user or the root crontabs, or it could be systemd (read man systemctl, and try systemctl list-unit-files). … Absent any other information, I'd have to guess that the solution to your problem is in two steps: Remove the script from ~/.bashrc Create a cron job under the @reboot facility FWIW: rc.local has been …
Seamus's user avatar
  • 22.9k
4 votes
Accepted

Run commands on boot of raspberry pi

The version of cron used in Raspbian provides a feature that allows us to start a program when the system boots. … If all this worked, you've just created a cron job that logs each system reboot to a file. …
Seamus's user avatar
  • 22.9k
4 votes
Accepted

Control fan to lower temperatur via script

Once you've verified things are working, create a cron job to run periodically to check your RPi temp and start the fan if it's temperature has exceeded your limit. … This will load your new cron job, and it will execute every minute. Any errors will be written to the file /home/pi/temp-fan.log. …
Seamus's user avatar
  • 22.9k
3 votes

Run script on boot.

Here's a suggestion for that bit: Add the command to your crontab, and let cron run it for you at any interval you specify. … In pico (or whatever your default editor is), add a line to tell cron your schedule. In your case, adding the following crontab entry will run your command every minute. …
Seamus's user avatar
  • 22.9k

1
2 3 4 5
8
15 30 50 per page