Cron is a job scheduler that allows users to run commands periodically.

learn more… | top users | synonyms (1)

1
vote
1answer
92 views

crontab is giving only 2045 lines of output instead of 6000 lines

I am executing one shell script with crontab which has to give more than 6000 lines output only it is giving output up to 2045 lines then coming out. when I run that shell script it is working fine ...
1
vote
1answer
51 views

Is it possible to use the at command to schedule a job to run at a given timestamp?

I want to schedule a file to run using the at command, as described in this tutorial. I see that the at command supports the posix format -- but I don't see any mention of timestamps. Surely it is ...
3
votes
1answer
219 views

How can I peek at the output of a running crontab task on OpenBSD?

I have an hourly hour-long crontab task running with some mtr (traceroute) output every 10 minutes (that is going to go for over an hour prior to it being emailed back to me), and I want to see the ...
0
votes
2answers
2k views

Cron job is not working [closed]

i have a cron job center code hereonfigured at var/spool/cron/testuser, Am calling "adindex.sh" file from there. Am getting results when am directly put the command directly in prompt(php and sh), ...
2
votes
2answers
619 views

How can a normal user trigger a root cron task to execute immediately, without delay?

I have a root cron task that runs every day. But I want to allow normal users to request that it run immediately, if they so wish. It is a harmless process and it can run as often as needed and these ...
2
votes
2answers
222 views

How can I manage my crontab effectively to avoid issue by multiple updates by multiple users?

I have a crontab that includes many users updating it. The problem is that because of this, it is not easy to know who did what modification of a cronjob. I was thinking to create a script to do a ...
3
votes
2answers
3k views

How to find a cron job if you know the specific time it runs?

I've been using kSar to look at my servers resource use. There is a definite spike in process creation at 4:04AM daily. Cron seems to define the interval they should be run, but not the specific time ...
0
votes
1answer
310 views

what does mean crond[2113] : (*system*) RELOAD (/etc/cron.d/mycron)

crond[2113] : (*system*) RELOAD (/etc/cron.d/mycron) My cron job is not working and I got the error above in log, What does mean that, how can I know what is going on. My cron job code: ...
0
votes
0answers
257 views

“No space left on device” - plenty of space and inodes left [closed]

I am using amazon linux on an ec2 instance. I am running a cron script as root that copies files to a different directory on the same machine, but some of the file copies are failing with a "no space ...
0
votes
1answer
137 views

cron runs job at unexpected times

I have set up a cron job on my local Ubuntu 12.04 server to log on a remote server through a passwordless ssh connection and run mysqldump on a database on that server once a day. My problem is that, ...
0
votes
2answers
244 views

using mergecap for set of files

Im trying to use mergecap to merge 15 old pcap files in a folder. I tried to use FILES=($(find /mnt/md0/capture/DCN/ -maxdepth 1 -type f -name "*.pcap" -print0 | xargs -0 ls -lt | tail -15 | awk ...
0
votes
1answer
91 views

How to get cron to delete files with names starting with foo and file extensions ending with bar? - done with php script

I'm sorry to post such a question but honestly, I've spent hours reading posts and still it doesn't work... Also if this should be posted else where but this felt like the right place. I have a ...
1
vote
2answers
178 views

Neither crontab nor anacron is running, how to debug?

I'm running Arch ARM on a PogoPlug and want to execute a file every hour, the file when call directly runs fine (it is executable), for testing the file /etc/cron.hourly/crontest contains ...
1
vote
3answers
342 views

dpkg-reconfigure: not found when running in cron

I have a virtual server (debian) and the clock fails to sync from time to time (probably because i save/restore state with vboxheadlesstray). To fix this issue I run dpkg-reconfigure ntp && ...
2
votes
1answer
3k views

Root Cron Won't Run Script (permission denied)

I've edited my root cron tab to periodically execute a script located in a particular user's folder using this command: sudo crontab -e When cron runs the script, this is the output: sh: 1: ...
7
votes
3answers
2k views

Using notify-send with cron

I am using Arch Linux with KDE/Awesome WM. I am trying to get notify-send to work with cron. I have tried setting DISPLAY/XAUTHORITY variables, and running notify-send with "sudo -u", all without ...
0
votes
1answer
25 views

Are the crontabs of users linked?

Our Linux server has a community user that has a crontab for itself. The admins don't want me to schedule my scripts on their crontab because they don't want to take responsibility for my programming. ...
0
votes
1answer
18 views

crontab nodification is taking too much time

There are 300 processes configured in a single Linux server's crontab. if I want to stop or modify any of them, I have to comment them out (i.e. # ..cron..) for all processes. It's a time consuming ...
1
vote
1answer
396 views

What does /etc/cron.daily/apt do?

Could someone explain what the apt script is doing in cron.daily please? I can't find any documentation on it. NOTE: I'm trying to investigate a server-server communications issue which frequently ...
15
votes
6answers
37k views

Why did my crontab not trigger?

I used crontab -e to add the following line to my crontab: * * * * * echo hi >> /home/myusername/test Yet, I don't see that the test file is written to. Is this a permission problem, or is ...
1
vote
1answer
75 views

Execution behaviour of cron

I want to schedule a cron so as to avoid running at midnight. I was thinking a period of 7 minutes. Now, I figured out with 7 minutes of interval, the last cron schedule for a particular day would be ...
1
vote
2answers
209 views

Script from cron doesn't create archive

I'm using: # cat /etc/redhat-release CentOS release 6.4 (Final) Have an script in user's crontab: $ crontab -l 0 7 * * * /home/teamcity/scripts/TC_backup.sh If I run this script under this very ...
1
vote
0answers
61 views

Create a fake read only device like file with incrond

I need to generate UUID with uuidgen (not through any function call, but external command, because processes which will read the file cannot call any APIs or external commands directly). My idea is ...
0
votes
0answers
24 views

Run Xdotool on multiple users at once

When running Xdotool on user one (cron): * * * * * export DISPLAY=:0 && xdotool mousemove 10 10 and I switch to user two for several hours, and back to user one, I find out Xdotool not ...
1
vote
1answer
3k views

running a script every 30 minutes with crontab using ROOT (Debian)

When I manually type: root@username:~# ./myscript.sh the script executes, however I tried the following combinations to have crontab execute myscript.sh every 30 minutes (forever) and none seem to ...
0
votes
1answer
1k views

What causes cron to continuously send mail and how can I disable it?

I have a problem on CentOS 6.3 system where the crond process tries to unsuccessfully send mail over and over (at least I think this is what its doing) until the OS eventually generates a "too many ...
2
votes
1answer
1k views

“stdin: is not a tty” mails for running scripts as cron jobs

I have several shell scripts (bash) which are started by cron. Every time a script is executed I get an email saying "stdin: is not a tty". Can someone please tell me how to fix this? All scripts run ...
1
vote
0answers
33 views

Unplug AC causes anacron to stop. No resumumption if cron.daily had already started?

Anacron is started/stopped by a number of means, one of which is when AC power is plugged/unplugged, as can be seen by examining /etc/apm/event.d/anacron and /usr/lib/pm-utils/power.d/anacron. You can ...
1
vote
1answer
215 views

Rotating iptables logs, strange message about script being converted to upstart job

I use a script /etc/logrotate.d/iptables containing entries like: /var/log/in_iptables.log { rotate 4 weekly missingok notifempty compress ...
1
vote
2answers
4k views

Globally change path for all users, even in cron

We're setting up an SGE cluster with CentOS 6. My sysadmin is installing applications that are not installed via RPM (i.e. via other means like make install) should go in a non-standard directory, in ...
2
votes
1answer
424 views

Crontab change MAILTO for only one specific job in Root's crontab

Can I do the following to change where mail goes for one specific crontab job in root's crontab (don't sent to root for Do Something job, just send to porklover): # Make a hambone appear * * * * * ...
0
votes
0answers
46 views

How do I interpret an entry about cron in Gnome System Log Viewer

Apologies if this turns out to be a trivial question. I am trying to set up a regular backup of my files prior to installing Fedora 19 instead of my current Fedora 12. In November 2013 I started a ...
1
vote
1answer
85 views

Does cron impose some limitations to types of commands and privilege of execution? [duplicate]

I've experienced an issue where some of my scripts run perfectly fine when I call them manually, but these same scripts when called as cron jobs via cron don't seem to work at all. So my question: ...
10
votes
7answers
6k views

How to restart the Python script automatically if it is killed or dies

I am running my Python script in the background in my Ubuntu machine (12.04) like this - nohup python testing.py > test.out & Now, it might be possible that at some stage my above Python ...
1
vote
1answer
144 views

Running cron jobs under php ver. 5.4

My hosting company switched me to php version 5.4. I run a Drupal site (D7.) They say: You'll want to make sure your crons use "/usr/php/54/usr/bin/php" instead, as otherwise it will use PHP 5.2. ...
0
votes
1answer
524 views

How to check whether my cron job for backup using tar was succesfull [closed]

I have a cron job to tar backup websites and databases and upload the backup to a NAS. Instead of checking the tar files on the NAS. Is there any way to check if the tar backup process completed ...
0
votes
3answers
198 views

Disable cronjob after reboots

How can I prevent cronjobs from automatically starting after my server has rebooted? Every time I reboot my server the cronjobs start up again, which I'd like to prevent. These servers are running ...
46
votes
3answers
6k views

Day of week {0-7} in crontab has 8 options, but we have only 7 days in a week

Day-of-week: Allowed range 0 – 7. Sunday is either 0 or 7. I found this after Googling, my question is why should both values (0,7) correspond to Sunday?
3
votes
1answer
129 views

How to switch tty with a script / cronjob

Is it possible to switch the current tty/vt with the help of a bash script or a cronjob? I only know the physical keyboard input "Ctrl-Alt-Fx". I would like to show two virtual desktops at different ...
2
votes
2answers
794 views

Need help with a script to test for memory usage

I'm trying to put up a temporary band-aid while I work out a solution for a app's memory leak. What I wrote was a small bash script that I put in the root on the server. This is what the script is ...
2
votes
1answer
103 views

Cron does not execute xinit command

I have a command that works perfectly when launched from the prompt: xinit /home/user/myscript.sh -- /usr/bin/Xvfb :1 -screen 0 1x1x8 But is not executed when put in crontab: @reboot xinit ...
15
votes
6answers
580 views

How to Find a Fugitive Crontab

A few years ago I setup a cron job to automatically ping a URL every minute as part of a monitoring system (that's oversimplification, but it'll do for this question). Because I'm a horrible person, I ...
2
votes
1answer
510 views

How to restore default crontab file

I have recently lost my cronjobs. now when i do crontab -e i am presented with an empty file. i would like to get the default file back with the nifty comments and explanaitions at the top!
2
votes
1answer
283 views

Suddenly lost all cronjobs

All of a sudden my cron jobs don't work any more. When I type crontab -e I am presented an empty file in the editor /tmp/crontab.3fMYGi/crontab And by empty I mean that not even this standard ...
3
votes
3answers
724 views

Is setting a higher nice level for a process an effective way to reduce its impact on system load/CPU time?

I have an rsync cron job which is pushing the server load and triggering monitor alerts. If I set the job to be run with a high nice level, would that effectively reduce the impact it has on system ...
0
votes
2answers
276 views

How to add the logs to a crontab with time stamp [duplicate]

In crontab, I scheduled a daily backup script. Now when the cron executes the script the status are logged to a log file as shown below. 0 0 * * * /home/backup.sh > ...
3
votes
2answers
216 views

Bash if script is called from terminal echo stdout to terminal, if from cron do not echo output

I would like to have a service watchdog script echo the status to the screen if called like ./watchdog.sh but if it is run by cron, there is no need to echo output. What is the proper method? Where ...
0
votes
1answer
249 views

Mysterious automated emails

I remember messing around with crontab and setting up email capabilities on a server many months back, and now all of a sudden I'm getting the following email: EMAIL HEADER: from: root ...
3
votes
3answers
71 views

Where to put system cronjobs?

If I need a cronjob that runs at system level (i.e. not specific for a certain user) how do you suggest me to create it? running crontab -e as root appending it to /etc/crontab creating a file ...
0
votes
1answer
702 views

Create cron as a apache user and run as root user

I am creating this cron as apache user and want to run this cron as root, below is my code snippet: # Create a cron job to restart apache cron_file="/etc/cron.d/restart_apache_crontab" cron_job="*/1 ...