Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
34 views

How does cron.d notify the system?

If I put a new script into /etc/cron.d/ how does the system know to insert it into the global crontab? Do I need to restart a process to pick it up? Does init run crontab every minute, and it'll ...
2
votes
3answers
37 views

Run bash_profile in cron job

I had a problem that my cron script wasnt loading the environment variables so I added the following line: #!/bin/sh bash /root/.bash_profile This seems to have no effect and the path variables are ...
1
vote
2answers
33 views

Cannot find crontab entry for a scheduled shell script

My predecessor set up a basic installation of CrunchBang in a VirtualBox VM - The Windows host runs a scheduled task to boot the VM, then CrunchBang runs a shell script some 10-15 minutes later to ...
0
votes
1answer
29 views

ubuntu crontab -e “/usr/bin/sensible-editor” killed; signal 9 (no core dumped)

Welcome to Ubuntu 11.04 (GNU/Linux 2.6.32-042stab037.1 x86_64) user@server:~$ crontab -e no crontab for user - using an empty one Select an editor. To change later, run 'select-editor'. 1. /bin/ed ...
0
votes
1answer
25 views

cron job gives me permission denied errors when running

Been trying to run a cron but keep getting permission died error in my /var/spool/mail/root "/bin/sh: /disk1/archives/backup.website.cron: Permission denied" This is my ls -hal for the directory my ...
2
votes
2answers
41 views

how to setup a cron job and using the proper syntax in my jobs

I want to make a cron job that creates a tar of my web directory. I have this job in place * * * * * tar -zcvfp /disk1/archives/websites/`date +%Y-%m-%d_%I-%M-%S-%p`/`date ...
2
votes
2answers
39 views

egrep not working in crontab

I have a simple bash script wich works fine when running in command line, but not in crontab: #!/bin/bash PATH=/usr/bin:/bin for f in /data/home/cwolff/tmp/*access_log*.txt; do egrep "r:[A-Z]+ ...
0
votes
3answers
45 views

crontab running as a specific user

I need to run a script daily. The script should be run as a specific user (ex. user1) not as root. So I put the cron file at /etc/cron.d and put the user name in the line (2nd column). But it gives an ...
1
vote
7answers
171 views

mysql database daily backup on ubuntu server

I use crontab -e in ubuntu server for running a backup.sh file every night at 02:00 AM. I wrote: 00 02 * * * root /home/backup.sh Then /etc/init.d/cron restart When do crontab -l it shows:00 02 * * * ...
1
vote
1answer
92 views

crontab steps plus increment

I want to issue two commands, c1 and c2, both every five minutes, but not at the same time, e.g. 0,5,10,15,20,... * * * * c1 2,7,12,17,22,... * * * * c2 is there a more elegant version using an ...
0
votes
0answers
32 views

Crontab have permission issues on file of its owner? Permission denied

I have a very simple cron job written in shell script, which scp a file from another server to local. e.g, #!/bin/bash scp $REMOTE:/$FILE ./ Of course, the server need a private key to login, ...
3
votes
3answers
69 views

Is there a good layout convention for cron files?

I'm currently confronted with a cron file that contains a dozen different applications' tasks--some have only one, some have lots. I'm trying to figure out a good way to organize and document these ...
0
votes
2answers
25 views

Do I need to refresh or restart anything after I add/update a crontab in Ubuntu Server 8.04?

When you change something in Apache you need to reload or restart apache. Does anything need to be refreshed or restarted in Ubuntu Server 8.04 after I add/update the crontab? Thanks a bunch for your ...
1
vote
1answer
95 views

Sending mail from command line if body not empty

I'd like to write a simple script that alerts me if a log changes. For this I'm using grep to find the lines I'm interested in. Right now it works like this: grep line /var/log/file | mail -s Log ...
6
votes
2answers
244 views

Is it bad to edit cron file manually?

It is usually instructed to introduce new cron jobs through command lines; but I found it easier (with a better control of current cron tasks) to manually edit (in text editor) the user cron file like ...
0
votes
1answer
26 views

trac-admin hotcopy not working when run from crontab

I've recently updated Trac from 0.11.4 to 0.12.2. I'm using the following shell script to backup Trac installation: #!/bin/sh DIR=/root/backup/trac/ NAME=`date +%Y-%m-%d-%H-%M` cd $DIR trac-admin ...
0
votes
3answers
100 views

Does /var/spool/mail/user ever get cleared?

I have a crontab task running every 5 minutes. It writes an output (result of the .sh file run by the crontab) to the /var/spool/mail/user. Should I be worried that this spooler will build up and slow ...
0
votes
4answers
53 views

How do you schedule jobs across a server cluster?

We have jobs that run on single servers on various schedules, but we need to run them on a cluster of servers regardless of which server is going to run them. It is as if we need a cluster-aware CRON ...
0
votes
1answer
45 views

Set php environment variable for cron via Plesk admin interface

Within our application we make use of a environment variable named SERVER_ENV that is used to set whether we are in a production or development environment. This is set through the httpd.conf file ...
0
votes
1answer
42 views

Any chance a crontab entry is deleted automatically after the entry is commented?

Maybe I'm mistaken, but it seems that every-time I commented out a crontab entry, it will deleted automatically. eg. ssh server crontab -e // commented out an entry using "#" // save and quit Next ...
0
votes
2answers
83 views

Cron Job not running ( too many open files )

Sorry I may be a bit of a newbie here and I have never really ran any cron jobs. Anyways, I am running an Arch Linux server which has cronie running on it and I have setup this cron job: 10 * * * * ...
0
votes
1answer
131 views

Cron not able to find correct versions of ruby and bundler gem

I have cron running for rails application on EC2 instance, but it fails with error - /bin/bash: bundle: command not found if I run bundle command with ubuntu user or sudo user that works. I have ...
1
vote
1answer
29 views

Check if cron ran and have fallback

I have written a realtime bus tracking program that runs a cron every minute to check the service of the bus. In order to remove some server resources I am going to be creating an instance on PHPfog ...
0
votes
2answers
81 views

crontab execution doesn't have the same environment variables as executing user

I ran my crontab job 0 2 */1 * * /aScript >aLog.log 2>&1 as a 'root' user, and however I found the env is different from env of the 'root' user, and therefore experiencing a different ...
0
votes
4answers
54 views

easily enable or disable cron

Whenever I need to enable crons, I will copy the cron file to the spool folder. cp /home/shantanu/shantanu /var/spool/cron/ chown shantanu:root /var/spool/cron/shantanu Will this work? Any issues ...
0
votes
1answer
80 views

shell script within crontab

I can run the following shell script from command prompt as expected: /bin/sh -xv /home/shantanu/backup_transfer.sh But when I set it in a cron, it does not execute correctly. There are 2 ...
2
votes
2answers
76 views

How To Backup “crontab -e” Files?

I want to do a complete server backup. I already have my backup script copying all of the html/php files for the web app, and the mysql databases, placing them into a .tar.gz file. How can I add the ...
1
vote
1answer
46 views

Cronjob every 14 days on a friday (i. e. every second friday)

I need to run a cronjob every 14 days on a friday i. e. every second friday. Following is the closest I can think of: 0 10 */14 * 5 I think crontab would run this cronjob at 10:00 on the 14th and ...
0
votes
2answers
52 views

crontab command says permission denied

I am working on cent-OS server. I have two scripts to run by cron. Scripts are in PHP and i have a Apache module of PHP installed on cent-OS. One Script should run everyday at 6pm and other on every ...
1
vote
2answers
307 views

Why is my php script not running on boot? Running from command line works fine

I have placed the following information into my crontab file by entering "crontab -e" (in both root and "ubuntu" users, on a 32 bit Canonical Ubuntu AWS instance): @reboot /usr/bin/php ...
2
votes
4answers
87 views

About using cron in Linux to schedule my python program

I want to use cron to hourly run a python program in Linux(ubuntu). I wrote a script called script.sh cd Dropbox/NetworkProject/AMT_Crawler/ scrapy crawl AmtCrawler --set FEED_URI=data.json --set ...
0
votes
1answer
67 views

The last part of a cron task fails, can't work out why

I've got a problem with cron on my server which i think is down to the environment or user that cron runs under. My app is set up under a user called deploy. The root folder for the app is ...
1
vote
1answer
51 views

How to configure cron to run jobs using specific timezone times

We have a system configured in local UK time - so its currently in BST and will be switching to GMT this coming weekend. There are some reports scheduled with cron that are for users in Hong Kong. ...
1
vote
2answers
82 views

Crontab doesn't start, no errors

I have the below crontab configuration ; 45 9 * * * sh /home/renko/mysql.backup.sh > /home/renko/mysql_back_log.log And my script is as below ; #!/bin/bash ### Backup Folder dir ### ...
0
votes
2answers
62 views

Setting up Cron Jobs as Root

I can run cron jobs manually like this root@myhosting [~]# sync ; echo 0 > /proc/sys/vm/drop_caches I can add it in to cPanel like this. This doesnt work because I need root access. * */4 * * ...
1
vote
2answers
87 views

cronjob send notification

I have a question, i'm working with crontab and generated some tasks that works fine...!! but I need to know if exists a way to keep the crontab notification in an especific file, now I sending this ...
0
votes
3answers
108 views

I deleted my cron jobs from cPanel, but it's still working. How to stop?

Got a problem. I created a cron job via cPanel and after what deleted it, but it didn't stop working. Anyone knows how to stop my crons?
0
votes
2answers
48 views

Crontab - combining times

I want to have my script run every 23'th around (so 11 PM) and between 7-19 every 2 hours. In directadmin I use this: 23,7-19/2 however, in crontab it will be ran every minute. What syntax should I ...
4
votes
1answer
101 views

crontab file of a deleted user

After removing the user, does the crontab added by that user gets removed as well? I am asking this because I can see a user file called "abcuser" in the /var/spool/cron/ When I cat the file, I ...
1
vote
1answer
74 views

Cron Error on Ubuntu (Command Not Found)

Trying to add this to the crontab (Ubuntu): 0 2 * * * /usr/local/sbin/aws dsnap | grep vol-193vja9 | sort -r -k 5 | sed 1,5d | awk '{print "Deleting snapshot: " $2 " Dated:" $8}; ...
0
votes
1answer
67 views

run all cron jobs under crontab

I hope I am asking this question correctly. I am trying to run all jobs that are setup on my server, by nano /etc/crontab I see the list of: # m h dom mon dow user command 27 * * * * root ...
0
votes
5answers
81 views

How to record time taken by a cron to execute.

I have a cron set to run every minute * * * * * /usr/php /my/location/script.php Now, I use time function to measure script execution time. So, running console$ time /usr/php ...
0
votes
1answer
60 views

shell script won't work in cron

I have very smiple script to do a backup, and it is working fine when I run it from the command line, but I am having problems running it as cron job. My cron entry is this: (running it every minute ...
0
votes
3answers
121 views

Why does cron on CentOS complain about carriage returns?

I have a CentOS 6 machine I am trying to run some cronjobs on and the jobs are failing complaining about a carriage return (^M) on the end of the line. Example /var/log/cron entry: CROND[20344]: ...
4
votes
1answer
75 views

crontab fails to set variable before job

My crontab looks like: root@slack13x64:~# crontab -l -u dnd # some variables SHELL=/bin/bash PATH=/bin:/usr/bin:/usr/local/bin:/home/dnd/bin MAILTO=root # Actual jobs 40 20 * * * ...
0
votes
2answers
141 views

Change Other Users Crontab

I've got a (deployment) script, that runs under my user 'me' and it should change the crontab of user 'ruby-server'. Am I right that the -u option (of crontab) doesn't help me much unless I use sudo ...
1
vote
2answers
175 views

Centos PHP-FPM Cron

I have nginx and php-fpm installed on my Centos vps box. I need to add a cronjob to execute a script every 10 minutes. I tried crontab -e with the following in it: */10 * * * * ...
1
vote
1answer
70 views

How can I setup/change the administrator email on linux server?

Supposedly, if you install a cron and the cron job has an output >/dev/null, it will be sent to the system administrator. Is this true? Where does the email get setup? I don't see anything in ...
0
votes
2answers
154 views

Set up a linux shell script cron job on Plesk 9.5.4

Operating system Linux 2.6.18-028stab089.1 Parallels Plesk Panel version 9.5.4 Set up a test cron job in Settings>Scheduled Tasks>user "root"> * * * * * /var/www/cron/webcrontest.sh ...
0
votes
1answer
27 views

Curl doesn't work in crontab

I'm new to set up server settings and to the whole unix thing so maybe this is simple. I'm trying to start crontab with curl in but it doesn't work. I want it go to file and send email every 30 ...

1 2 3 4 5 6