0
votes
1answer
47 views

Shell script not running with cronjob

I am using PUTTY to reach the server. I can dump the databases with the following command: /usr/bin/mysqldump --all-databases | /bin/gzip > Backup_DB/alldatabases_test.sql.gz When I am running ...
0
votes
1answer
76 views

Who starts updatedb process and why it uses 700+% CPU?

I have a VPS running CentOS, and recently its CPU usage goes over 700% for two times already. It always turns out to be a process named "updatedb" (as show in the figure below). After a quick ...
1
vote
1answer
122 views

Cronjob for first day of month except sunday

I have such entry in my crontab: 0 0 1-2 * 1-6 It is correct that it would run at 00:00, 1st or 2nd day of the month from Monday to saturday? For example, if 1st day will be sunday then it would not ...
3
votes
2answers
453 views

Shell script running from cron not running python

I have python program, I want to run it everyday with different variable (on CentOS server): #!/bin/sh /usr/bin/python /root/testing/test.py --variables /root/testing/daily/test1.txt while [ $? != 0 ...
1
vote
1answer
721 views

How can I set a system wide PATH-variable for cron on Centos 6.4

I'd like to make sure that every user specific crontab has the same PATH-environment. I tried to set the PATH in /etc/crontab but it seems like this config file is not read by crond. Following are ...
1
vote
3answers
72 views

Prevent users from using the same cron schedule?

I've a lot of users in my server using exactly the same cron schedule and this is causing high server load. Can we prevent this? For example, if there's x numbers of users that use the following cron ...
1
vote
1answer
280 views

How to edit multiple cpanel user cron jobs at once?

I'm using cat /var/spool/cron/* to view all cron jobs created by all cpanel users. Is it possible to edit its output just like editing via nano and hit save?
2
votes
2answers
76 views

How to find rpm binary of a given process?

Here is the problem: I'm trying to find what cron software is running on my machine, however question applies to any generic process. One way to do it is: Find the process ps aux |grep cron Find ...
1
vote
3answers
287 views

cannot access crontab with sudo after being added to /etc/sudoers list

My user "craig" is in the /etc/sudoers file on my CentOS 5.6 VM, however when I try to access the crontab using the command below I am presented with an error message: sudo crontab -e -u ...
1
vote
0answers
91 views

script executing perfectly in terminal but not in cron

I setup a script for to take an mysql db backup everyday on a specific time, so now the cron is running perfectly it executing the script without problem but the problem is db backup file is not ...
7
votes
1answer
8k views

what is run-parts in /etc/crontab, and how do I use it

I have been digging through my Linux system. To try and understand how it all works In the /etc/crontab file. I see the following # run-parts 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * ...
1
vote
1answer
972 views

why does my python cron job time out?

I have a long cron job running a python script in CENTOS, but for some reason it seems to timeout or otherwise end without completion. the job runs fine when executed straight from bash, but seems to ...
1
vote
2answers
772 views

How to create snapshots of your server for backup in Cent OS 5

I'm making the move from VPS to Dedicate server. Unfortunately, most dedicated servers do not provide server backups like managed VPS's do and I really like the piece of mind of having a backup of all ...
1
vote
0answers
584 views

Set the from address on emails from cron/Set default from address for sendmail

As a normal user I can send email, either from the commandline or from PHP. But when a cron job has error output, sending of that email fails (I have a MAILTO=me@example.com at the top of the ...
0
votes
1answer
622 views

Scheduled process killing and restart

I have to write a script for a CentOS server which will kill and restart a process every three days. After killing the process it needs to execute another script and start the killed process. ...
2
votes
1answer
1k views

/etc/environment and cron

I've got two machines: Fedora and CentOS. And a cronjob 0-59 * * * * env > /home/me/env.log On CentOS I can see that /etc/environment is affecting the output while on Fedora it does not. I want ...
2
votes
5answers
13k views

How to use crontab to run a script as nobody

This is on a CentOS machine. I'm trying to run a script as user nobody (or as a user with minimal permissions) at a certain time every day. Here is nobody: [root@CentOS % ~] grep "^nobody" ...
1
vote
1answer
1k views

Fedora Crontab Changes

When I make a change to the /etc/crontab file, what service do I need to reload/restart in order for the changes to take effect? service crond restart doesn't work. "crond: unrecognized service"