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

learn more… | top users | synonyms (1)

0
votes
2answers
312 views

Backup of svn repository and mysql database on daily basis

How do I instruct Ubuntu 13.10 server to: zip svn repository dump mysql database into .sql script tar both files copy backup tar onto sdb disk Are there any premade tools for such kind of ...
2
votes
2answers
204 views

Running cron.daily in parallel

Being able to put a script in /etc/cron.daily is really nice because I can do it easily from a configuration management system or a package. However, my understanding is that all the entries in ...
2
votes
4answers
389 views

Cron not running my script

I'm not sure why but my app never executes when I reboot my machine. In crontab > crontab -e I see @reboot /root/myscriptname.sh The file is #!/bin/bash nohup mono-sgen /root/myapp.exe ...
1
vote
1answer
268 views

Use /etc/init.d/fetchmail with the personnal ~/.fetchmailrc

Now, I have two users in my system using fetchmail with a personal ~/.fetchmailrc and syncing there mails with the command fetchmail -kv --uidl -m '\''/usr/bin/procmail -d %T'\ (In a cron but this ...
1
vote
0answers
33 views

Why am I not receiving any system e-mails? [closed]

In my crontab, I have the following: * * * * * sh /home/rimmer/test.sh In /home/rimmer/test.sh I have the following: #!/bin/bash echo 'test'; I have also set chmod +x /home/rimmer/test.sh, of ...
2
votes
3answers
2k views

Installing crontab using bash script

I have created a script to install two scripts on to the crontab. #!/bin/bash sudo crontab -l > mycron #echo new cron into cron file echo "*/05 * * * * bash ...
1
vote
1answer
179 views

Logrotate not picking up or acting on new configuration file

I had a logrotate configuration file set up for a log (let's call it Log1). It is working fine and the log is rotating everyday as expected. Yesterday I cloned this set up and modified it for three ...
1
vote
1answer
111 views

Debian, nonroot, cron, bash script and rebooting at specific time

As nonroot user, how can I schedule a reboot every day at 4:30am? 30 04 * * * /home/user/scripts/reboot.sh As a nonroot normal user, I'm sure the system won't allow me to use the reboot command. ...
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 ...
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
633 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 ...
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
315 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
249 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
0answers
112 views

filter cron emails through procmail?

I'm using postfix/mutt/procmail on a Linux/Debian and I've some trouble filtering cron emails with procmail, I just want to move them to the cron/ maildir directory, but no lucky till now. I've ...
0
votes
1answer
93 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 ...
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: ...
0
votes
2answers
2k views

Is a restart of cron or crond necessary after each new schedule addition or modification?

When I schedule a job, some seem to be applied immediately, while others after a reboot. So is it recommended to restart cron (crond) after adding a new cron job? How to do that properly (esp. in 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 ...
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 ...
1
vote
1answer
404 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 ...
1
vote
3answers
350 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 && ...
0
votes
1answer
26 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. ...
2
votes
1answer
204 views

kill process in script while writing file behavior

in my php script which runs as a cron job, I have foreach($sites as $site) { exec('./wkhtmltoimage-amd64 ' . $site . ' somefile.png'); exec('./zopflipng -y somefile.png somefile.png'); } ...
0
votes
1answer
19 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
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
0answers
62 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
2answers
2k views

sh script will not execute as root (cron)

I have the following script added to cron. If I add touch thisisatest.file to the first line it will create a file named thisisatest.file, but not execute the rest of the code. If I manually type ...
7
votes
2answers
9k views

crontab's @reboot only works for root?

man 5 crontab is pretty clear on how to use crontab to run a script on boot: These special time specification "nicknames" are supported, which replace the 5 initial time and date fields, and ...
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 ...
1
vote
2answers
216 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 ...
3
votes
3answers
607 views

Bash script to delete a file called index.html recursively

I need a bash script (not sure how to write the actual .sh file) which I could set to be run by cron every minute and that would delete files with the name index.html that are in a specific directory ...
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
34 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
218 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 ...
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 ...
2
votes
1answer
441 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 * * * * * ...
1
vote
1answer
86 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
145 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
3answers
201 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 ...
0
votes
2answers
247 views

Is this sar/sysstat cron job formatted correctly?

I want it to give me all the sar/sadc options, interrupts,disk,etc.. every 10 seconds starting at noon for the entire hour. On the second line I want to capture the info in /proc/interrupts every ...
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 ...
2
votes
1answer
517 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!
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?