gentoo crontab: why this simple crontab is not working?
The syntax you use in crontab -e
does not allow you to specify the user name; it always runs as yourself.
So, the root
is a syntax error (it causes Cron to try to run the command root
, which probably does not exist); take it out and try again.
If you need the job to run as root, put the file (now with the user name) in /etc/cron.d/
.
Crontab not triggered at all
From the top of my head, 'curl' is not in the PATH, when cron is trying to execute it. Type its absolute path, or use the PATH variable in the crontab. If that doesn't help, I would check if /usr/sbin/cron is running. If it is, also check permissions of /var/cron/tabs/ and its contents, and check the log file /var/log/cron for any suscpicious errors.
crontab shutdown command never runs
After my question was unhelpfully downvoted with a link to a lot of things that didn't work, I got the help I needed on the Linux Mint forums - the secret was to edit crontab using the sudo command; "sudo crontab -e" That and other useful info is at this post. https://forums.linuxmint.com/viewtopic.php?f=47&t=275029&p=1507982#p1507982
Why is this cron entry executed twice?
Nothing in the description gives reason for it to be executed twice. Look elsewhere.
- Do two users call it?
- Is it entered twice?
- Does it call itself?
- Does it set in motion conditions for repetition?
If it's a shell script you're executing, have it append whoami
and date
to a log file. You should be able to dig up the reason.
UPDATE
Type ps -A | grep crond
, make sure crond isn't running twice.
Crontab wont run python script
Add
#!/usr/bin/env python
to the beginning of your script - right now it's trying to execute your script as a bash, that line says "I'm a python script, please use the right interpreter". It's also called a hash-bang line, but it needs to be the first line in your script.
Related Topics
How to Copy All PDF Files from a Directory and Its Subdirectories to One Location
Get Started with Latex on Linux
How to Recompile Just a Single Kernel Module
Check Whether a Certain File Type/Extension Exists in Directory
Display Only Files and Folders That Are Symbolic Links in Tcsh or Bash
How to Pipe Output from Grep to Cp
How to Decrease the Size of Generated Binaries
How to Find My Shell Version Using a Linux Command
Running as a Host User Within a Docker Container
Gpg: Sorry, No Terminal at All Requested - Can't Get Input
Escape Single Quotes in Shell Script
How to Write Multiple Line String Using Bash with Variables
How to Include File in a Bash Shell Script
I Get "Dquote>" as a Result of Executing a Program in Linux Shell
Does Linux Kill Background Processes If We Close the Terminal from Which It Has Started
How to Determine the Current Ip from a Known MAC Address
Why Does Perf Stat Show "Stalled-Cycles-Backend" as <Not Supported>