0
votes
2answers
33 views

How to set cron job for system

I'm really new on Linux and have no any previous experience on it. And I opened this account to ask this question. I need to install a cron job I've followed the short guide here. Well, I think it ...
1
vote
0answers
28 views

How to find out why my cron didn't run? [duplicate]

This is the content of root's crontab: 0 23 * * 0-4 /usr/sbin/rtcwake -time `date --date="+16 hours" +"%s"` -m mem This is set to fire off that command every Sun-Thu at ...
1
vote
1answer
33 views

bash script not being run by cron [duplicate]

I have a very simple bash script that runs flawlessly when I do ./removeOldBackup.sh or sh /home/myusername/backup/removeOldBackup.sh but when I add it to crontab like * * * * * sh ...
1
vote
1answer
66 views

Why doesn't my supervisor daemon start on reboot?

I have added a crontab entry via crontab -e for the current user: @reboot supervisord -c /etc/supervisord.conf Yet after the reboot, supervisord demon is not running. I need to run the command ...
-2
votes
1answer
51 views

How to send a message in Minecraft before rebooting the server? [duplicate]

I have a Ubuntu Linux Server 14.04 LTS which is running a Minecraft server. I want it to reboot every 6 hours. I have that now and after the reboot, it starts the Minecraft server. Now what I want. I ...
6
votes
1answer
335 views

Recover cron jobs accidently removed with crontab -r

I entered crontab -r instead of crontab -e and all my cron jobs have been removed. What is the best way (or is there one) to recover those jobs?
1
vote
1answer
42 views

Logrotate behaving unexpectedly

Find below the logrotate configuration that I'm using /usr/local/nagios/var/nagios.log { copytruncate daily rotate 7 compress missingok size 100M } And I could notice that ...
3
votes
1answer
157 views

Automatically detect when a file has reached a size limit

I would like to send an email when a file reach a certain size limit. The only way I thought of doing this is by doing a cronjob which will check the file size and send the email if the file is ...
3
votes
2answers
147 views

Does cron know that the instance to be scheduled is already running?

I was wondering if we add a job in the crontab e.g. to run every 5 mins and the job does not actually manage to finish in 5 mins, does the cron daemon know that the previous instance is already ...
2
votes
1answer
71 views

Accidentally typed crontab with just the dash

What happens when I type just "crontab -"? The "e" didn't take before I hit Enter. It just moved the cursor to the next line and I had to Ctrl+C to exit, but I'm not sure what it did exactly. I'm on ...
0
votes
1answer
30 views

Crontab in Daylight Savings

This weekend with daylight savings, we had a situation that when the system clock hit 3:00am from the jump, we had hundreds of processes fire off out of the crontab. Everything I'm reading says that ...
-3
votes
1answer
76 views

Is there a better way to stop and restart Apache server every 30 minutes? [closed]

I have to stop and restart Apache every 30 minutes in order to avoid it becoming extremely slow over time. The cron job that I use as follows: @echo off rem Launch google.com, wait 2 seconds, then ...
1
vote
0answers
32 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
963 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
85 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
85 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 ...
0
votes
0answers
185 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
2answers
175 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
95 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
72 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
128 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 ...
5
votes
3answers
1k 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
24 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. ...
1
vote
1answer
69 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 ...
5
votes
2answers
4k 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
votes
2answers
188 views

Shell script passing null value while executed as cron job [closed]

We are using the below commands to get pagesapce values and I need to check percent of used pagespace. For this I have used the below code, but when running this script it's passing a null value into ...
0
votes
2answers
520 views

create a cronjob to run php script

I've created a cronjob in Xubuntu to run a PHP script in every 5 minutes. I did it as follows. I entered the following command: $ crontab -e Then entered the following: */5 * * * * /usr/bin/php ...
0
votes
1answer
3k views

How to use Crontab for a java file in linux

How can I use Crontab in Linux specifically for a Java program? I want to run a MIS Script. How can I crontab it and what should the path be?
3
votes
4answers
210 views

Does cron jobs per se represent a significant burden on a modern system?

I'd like to run a pretty simple script (is there a dir with name x in dir y if so move it to dir z–and x will only be there about once a day) every 15 seconds or so (one minute divided into 4*15 ...
2
votes
2answers
196 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 ...
1
vote
1answer
106 views

Get system notification at a certain time?

Is there a way, in Linux or FreeBSD, to receive notification from system at a specified time? I'm thinking something in like of what inotify in Linux does for filesystem events. There IS a way to ...
1
vote
1answer
105 views

How can I create cron jobs in specific files?

I want to have a separate folders for cron jobs like: /mydata/cronjobs Now in that folder I want to have files like backup_server which will have the content like: 30 3 * * 1-5 ...
4
votes
1answer
667 views

How is cron scheduling actually implemented and makes sure scripts run on time?

I want to ask about cron jobs. OK, we place the scripts in the crontab and the cron daemon executes them. Now if I understand this, each minute, cron checks the crontab of each user and executes the ...
1
vote
1answer
116 views

How to prevent the termination of Anacron jobs after battery mode commences?

I have a backup script which is run daily by Anacron. It can take around 3 hours to complete. I'm happy for Anacron not to commence the script if the laptop is running on batteries, but once started, ...
1
vote
2answers
106 views

Third cron field doesn't seem to work (job runs when I don't want it to)

I scheduled a job like this: * * 6-8 * 1-5 echo "test" >>/tmp/test.log 2>&1 I expect this job to run only on 6th,7th,8th, these 3 days. but today is 18th, it still runs. What ...
0
votes
5answers
584 views

cron job schedule

I created a cron job using * */2 * * * schedule. Can anyone tell me what schedule this refers to? I guess it should execute every 2 hours, but it seems to execute every minute.
2
votes
2answers
298 views

How do I check active crons?

I'm trying to hunt down a cron job (or the equivalent) which I know is running, but I can't find it in the default cron files for my system (FreeBSD / Linux / BSD). How can I tell which ones are ...
1
vote
2answers
3k views

Watchdog script to keep an application running

I currently use an application called MxEasy on my linux servers to display video from a couple of IP cameras. The software is rather buggy and crashes occasionally. I've wrote a script that checks to ...
2
votes
4answers
12k views

crontab -e , then 0 * * * * = every hour; then xclock

After sudo crontab -e (it wrote "/tmp/crontab.XXXX70pN9h" 1L, 19C 1,1 All Then I saved the file. And to check..? (how? i don't know) And to check I ps -e | grep cron 29818 ? ...
2
votes
1answer
353 views

How to use crontab (Gentoo)?

First I installed and ran crontab: emerge cron crontab -e In another console, I ran man cron, but this has no examples of how to use crontab. Where can I get examples, and why are there none in the ...
5
votes
3answers
2k views

How can I ensure my cronjob will run at specified time?

I'd like to know how I can check to see if my cronjob will run at the specified time I set it at. Is there anyway I can test this without having to wait for that time? Here are my crontab -l results: ...
4
votes
3answers
1k views

In linux, would it be possible to run a script every day 3 minutes later than the previous day?

My first solution to this was to execute date +%Y%m%d%H%M and put that format of numbers into a file, and run the script every minute from cron. Then if the date from the file matches the date ...
2
votes
1answer
882 views

Custom directory for cron commands

I'm using vixie cron on Debian/Ubuntu. How to set a custom directory to be read by cron? I want to lead crontab to run commands found in a series of files, e.g. /home/cron/*.cron or perfectly ...
4
votes
2answers
1k views

/etc/crontab permissions

The /etc/crontab file has the permissions: -rw-r--r-- I understand that this file is for system cron jobs and other users should not have permission to modify it. The current permissions allows all ...
2
votes
2answers
572 views

Is there anything in unix crontab to determine this should be executed in PST/CST standard time?

There is this thing in QuartzScheduler where we can say execute this in CST/BST/ or whatever timezone. This is also good when you want to execute some jobs in certain timezones and certain jobs in ...
2
votes
2answers
3k views

List currently running cron tab and stop it

I created a cronjob, it runs for a very long time but now don't know how to stop it. Please help.
6
votes
2answers
6k views

Can I change the default mail recipient on cron jobs?

I believe that if there is any output from a cronjob it is mailed to the user who the job belongs to. I think you can also add something like MAILTO=vivek@nixcraft.in at the top of the cron file to ...
14
votes
3answers
4k views

Are multiple @daily crontab entries processed in order, serially?

I want two jobs to run sometime every day, serially, in exactly the order I specify. Will this crontab reliably do what I want? @daily job1 @daily job2 I'm assuming they run one after the other, ...
1
vote
2answers
433 views

Crontab not triggered

I have a program written in C with OpenCV. It captures an image from the webcam and saves on the disk with the name given as an argument. I want to trigger it every minute, thus I inserted the ...
3
votes
3answers
852 views

Is crontab multithread?

I don't know where I can find more information about crontab, so I ask here. Crontab is it multithread? How does it work?