Gentoo Crontab: Why This Simple Crontab Is Not Working

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



Leave a reply



Submit