Questions tagged [cron]

Cron is a time-based job scheduler in Unix-like computer operating systems. Cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates.

For information about the most common cron issues and how to fix them, see Why is my crontab not working and how can I troubleshoot it.

1957 questions
0
votes
3 answers

WGET Localhost 0 bytes

Hi I am trying to execute wget locally using cron, I have been told by my hosting that due to a local loopback that this won't work? I am attempting the following command: wget -q -O /pathtofile/blah.xml "http://myurl/myfeed.php?id=26" What I am…
simon
0
votes
2 answers

crontab's invalid time checking is inconsistent

One of our DBAs created the following crontab entry to run a backup every 3 hours starting 6:30 AM to midnight every day: 30 6-24/3 * * * (path to backup script) Cron took the entry but did not run the backup as expected. I am not a sysadmin or a…
Arun Gupta
  • 11
  • 1
0
votes
1 answer

Cron bash script skips second do/done set

I have a script that checks IPs for ping reply then tries to run an snmpwalk on them. I am trying to schedule the script to run weekly in cron. When I run the script in the shell, it runs perfectly. When I execute the cron in webmin, it skips the…
kdawg4
  • 96
  • 6
0
votes
1 answer

Daily postgresql cron error log file

I am getting these emails daily: /etc/cron.daily/logrotate: error: error accessing /var/log/postgresql: No such file or directory error: postgresql-common:1 glob failed for /var/log/postgresql/.log error: found error in /var/log/postgresql/.log ,…
wharfdale
  • 151
  • 8
0
votes
1 answer

Sending cron output as a text file attachment

I sysadmin a multiplayer game at CentOS 6.5 Linux server for a customer. The customer has requested me to send the daily chat logs (to identify and ban agressive players) - as a text file attachement. So I have come up with the following crontab…
Alexander Farber
  • 714
  • 4
  • 17
  • 38
0
votes
1 answer

Cronjob for a bash script pauses for 2 minutes randomly

I have been running a bash script on CEntOS 5.5 machine that checks replication on a remote mysql server. The script creates a temporary lock file and is scheduled to run in Crontab every minute. But once in a while the cron job goes out of sync -…
0
votes
1 answer

zip in cron doesn't work, but zip from command is working

I need to back up a directory with zip -r /savehere/backup_`date +%y%m%d%H%M%S` /save/this -q It works fine. But not from crontab: * * * * zip -r /savehere/backup_`date +%y%m%d%H%M%S` /save/this -q neither * * * * cd /savehere/; /usr/bin/zip -r…
Qiao
  • 143
  • 1
  • 7
0
votes
1 answer

simple crontab every 5min not working

I am trying to setup a crontab to execute a command from a specific user. Here is my code in "crontab -e". Why is this not working ? */5 * * * * user /home/user/whoami>swag.txt I am running ubuntu14. EDIT: I am using a personal crontab. I am…
Narayana
  • 101
  • 3
0
votes
1 answer

cron.daily not running at the time it should?

My /etc/cron.daily scripts seem to be executing far later from what I understand they should. I am in Ubuntu and anacron is installed. If I do a sudo cat /var/log/syslog | grep cron I get something like: Aug 23 01:17:01 mymachine CRON[25171]:…
0
votes
0 answers

Crond stopped sending e-mails for no apparent reason

I have a cron job that I want to run just once a day (executes a rake task), but while I'm testing it I have it set to run every 5 minutes. It was running perfectly fine this morning and sending me e-mails with the output but it has inexplicably…
sixty4bit
  • 141
  • 1
  • 6
0
votes
1 answer

Spam emails from Suse server: test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp

Have a virtual server with old Suse. About a month ago cron started spamming me with emails like this: Subject: test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp Body:/usr/share/sendmail/sendmail: 899:…
FoxyBOA
  • 417
  • 1
  • 6
  • 12
0
votes
1 answer

Why does this command to send emails work from the shell but not as a cron job?

I have a problem with cron jobs, I need to send email notification to users, I use this command curl "http://example.com/index.php?option=com_community&task=cron">/dev/null 2>&1 When I run this command in shell it works, and it sends emails, but…
0
votes
1 answer

Starting a detached screen has no effect

I want to start a shell script in detached mode on ubuntu bootup (via cronjob @reboot) but it doesn't even work when I try it directly. Syntax: screen -d -m -S myscreenname /path/to/my/script.sh There is no feedback at all and no screen is being…
user3245821
  • 63
  • 1
  • 1
  • 5
0
votes
1 answer

MySQL: Error establishing a database connection

I'm running a DigitalOcean.com Virtual Server with the typical Ubuntu LAMP Stack for a few WordPress sites. Of course, every week or two the MySQL service seems to crash. If I restart MySQL or the Server, it's fine. I assume I'm getting hit hard by…
jjwdesign
  • 53
  • 6
0
votes
2 answers

How to make sure script is always running?

I have 4 scripts in crontab that start on server boot. After 12 hours or so, some throw an exception and stop running. At that point, I want my server to just start the script again, so each script is always running. I can run: ps ax | grep…
User
  • 1,405
  • 3
  • 14
  • 17