Search Results

Search found 297 results on 12 pages for 'crontab'.

Page 3/12 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to automatically visit a website in the background after Ubuntu booted?

    - by Bakhtiyor
    I wanted to know how to automatically visit a website in the background when Ubuntu loads. As far as I know w3m is for visiting web site from the console. That is why I am writing following command in the crontab -e. @reboot w3m http://example.com/ > test_file The reason for writing content of the web site into a test_file is just to know whether this command has been executed or no. Unfortunately it is not executing every time Ubuntu loads. But next command which comes after it and looks like this: @reboot date >> reboot_file is being executed every time. What is wrong with my command? When I execute it in the console it outputs the content of the example.com into test_file. Is there any other options to do that?

    Read the article

  • How to visit automatically a website in the background after Ubuntu loads

    - by Bakhtiyor
    I wanted to know how to automatically visit a website in the background when Ubuntu loads. As far as I know w3m is for visiting web site from the console. That is why I am writing following command in the crontab -e. @reboot w3m http://example.com/ > test_file The reason for writing content of the web site into a test_file is just to know whether this command has been executed or no. Unfortunately it is not executing every time Ubuntu loads. But next command which comes after it and looks like this: @reboot date >> reboot_file is being executed every time. What is wrong with my command? Because when I execute it in the console it output content of the example.com into test_file. Is there any other options to do that?

    Read the article

  • Why doesn't cron complete my script?

    - by brickinthewall
    I have a backup script (rsync via ssh) which is run by cron (configured in /etc/crontab) 0 2 * * * root /bin/bash --login /opt/aebackup/sshbackup.sh If I run it as logged in root like following it runs prefectly fine. root@server:~# /opt/aebackup/sshbackup.sh If I run it via cron it would just stop after a while (not always on the same task in the script.. it seems pretty random, like the process is killed at some point randomly) Does anyone have an idea why my cron would do that? thanks for anything... I'm desperate!

    Read the article

  • How to automate mysql backups?

    - by Patrick
    hi, I want to automatize the backup of my databases and files with cron. Should I add the following lines to crontab ? mysqldump -u root -pPASSWORD database_name | gzip > /home/backup/database_`date +\%m-\%d-\%Y`.sql.gz svn commit -m "Committing the working copy containing the database dump" 1) First of all, is this a good approach? 2) It is not clear how to specify the repository and the working copy with svn. 3) How can I run svn only when the mysqldump is done and not before ? Avoiding conflicts Any other tip ? thanks

    Read the article

  • why doesn't cron complete script

    - by brickinthewall
    i have a backup script (rsync via ssh) which is run by cron (configured in /etc/crontab) 0 2 * * * root /bin/bash --login /opt/aebackup/sshbackup.sh if i run it as logged in root like following it runs prefectly fine. root@server:~# /opt/aebackup/sshbackup.sh if i run it via cron it would just stop after a while (not always on the same task in the script.. it seems pretty random, like the process is killed at some point randomly) does anyone have an idea why my cron would do that? thanks for anything.. i'm desperate!

    Read the article

  • Run a shell script using cron

    - by Blanca
    Hi! I have this FeedIndexer.sh: #!/bin/sh java -jar FeedIndexer.jar Just to run FeedIndexer.jar which is in the same directory as the .sh, I would like to run it using crontab, so I did this: # /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) 01 01 * * * root run-parts --report /home/slosada/workspace/FeedIndexer/target/FeedIndexer.sh # But I don't know how to run it. Have i made any mistake?? Thank you!

    Read the article

  • javan-whenever not writing crontab with Capistrano deploy

    - by Gordon Isnor
    I’ve been trying to get whenever running on an ec2 instance that was created with ec2 on rails. When I deploy with Capistrano it indicates that the crontab was written, but when I log into the server and run crontab -l it does not seem to have been changed. If I go into the release folder and manually run whenever --write-crontab then run crontab -l - it gets updated properly. Any ideas what could be causing this? Capistrano is not indicating any errors so not sure how to debug, have tried a billion permutations and combinations and nothing changes.

    Read the article

  • rsync ssh not working in crontab after reboot

    - by kabeer
    I was using a script to perform rsync in sudo crontab. The script does a 2-way rsync (from serverA to serverB and reverse). the rsync uses ssh to connect between servers. After i reboot both the server machines, the rsync is not working in sudo crontab. I also setup a new cronjob and it fails, The error is: rsync error: unexplained error (code 255) at io.c(600) [sender=3.0.6] rsync: connection unexpectedly closed (0 bytes received so far) [receiver] However, when run from terminal, the rync script works as expected without issues. please help. looks like issue with ssh. however, i am able to ssh into either servers withoiut issues.

    Read the article

  • How Do I Properly Run OfflineIMAP in a Crontab

    - by alharaka
    Installed Fedora. # cat /etc/redhat_release | awk ' { print F "> " $0; print ""; }' Fedora release 14 (Laughlin) Installed offlineimap from yum, cuz I'm lazy these days. # yum info offlineimap | awk ' { print F "> " $0; print ""; }' Loaded plugins: langpacks, presto, refresh-packagekit Adding en_US to language list Installed Packages Name : offlineimap Arch : noarch Version : 6.2.0 Release : 2.fc14 Size : 611 k Repo : installed From repo : fedora Summary : Powerful IMAP/Maildir synchronization and reader support URL : http://software.complete.org/offlineimap/ License : GPLv2+ Description : OfflineIMAP is a tool to simplify your e-mail reading. With : OfflineIMAP, you can read the same mailbox from multiple : computers. You get a current copy of your messages on each : computer, and changes you make one place will be visible on all : other systems. For instance, you can delete a message on your home : computer, and it will appear deleted on your work computer as : well. OfflineIMAP is also useful if you want to use a mail reader : that does not have IMAP support, has poor IMAP support, or does : not provide disconnected operation. And, lo and behold, every time I run offlineimap and try to redirect output in a crontab, it does not work. Below is my .offlineimaprc. [general] ui = TTY.TTYUI accounts = Personal, Work maxsyncaccounts = 3 [Account Personal] localrepository = Local.Personal remoterepository = Remote.Personal [Account Work] localrepository = Local.Work remoterepository = Remote.Work [Repository Local.Personal] type = Maildir localfolders = ~/mail/gmail [Repository Local.Work] type = Maildir localfolders = ~/mail/companymail [Repository Remote.Personal] type = IMAP remotehost = imap.gmail.com remoteuser = [email protected] remotepass = password ssl = yes maxconnections = 4 # Otherwise "deleting" a message will just remove any labels and # retain the message in the All Mail folder. realdelete = no [Repository Remote.Work] type = IMAP remotehost = server.company.tld remoteuser = username remotepass = password ssl = yes maxconnections = 4 I have tried TTY.TTYUI, NonInteractive.Quiet and NonInteractive.Basic with different variations. With or without redirection, the crontab entries I try cause problems. $ crontab -l | awk ' { print F "> " $0; print ""; }' */5 * * * * offlineimap >> ~/mail/logs/offlineimap.log 2>&1 */5 * * * * offlineimap I always get the same damn error ERROR: No UIs were found usable!. What am I doing wrong!?

    Read the article

  • Change default text editor for crontab to vim

    - by Max Williams
    I'm using ubuntu 9.10 and the default text editor is nano, which i hate. (doesn't everyone?) Normally it's not a problem as i just vi or gedit everything but crontab -e is opening with nano. I tried changing it to vim using sudo update-alternatives --config editor and selecting option 3 ("/usr/bin/vim.basic"). This has changed it for sudo and non-sudo alike. But crontab -e still opens nano. Any ideas? max

    Read the article

  • Why doesn't this cron work?

    - by Alex
    I do "crontab -e" and add the following line: 0 9 * * * /usr/bin/python /home/g1/g1/utils/statsEmail.py > /home/g1/log/statsemail.log But it doesn't work! Why? The script itself works. Also, the log is empty. My other command in crontab is this, and it works: 0 9 * * * /usr/bin/python /home/g1/g1/sphinx/updateall.py > /home/g1/log/updateall.log

    Read the article

  • Problems getting Cron to run processes tagged @reboot for LDAP users

    - by Ben Torell
    I have a lab of computers running Ubuntu 9.10. Most of the people who log on to these computers are users from an LDAP server, and not local users. We discovered that if an LDAP user has a crontab with an entry marked to be run @reboot, the command will not actually run upon the reboot of a machine. I'm pretty sure that this is because the cron daemon starts before networking is fully up, so the crontabs of any LDAP users aren't loaded and run or checked for @reboot. In fact, cron will ignore LDAP users' crontabs entirely after a reboot until that user runs crontab -e again and saves, or until the cron daemon is rebooted. We were able to fix one part of this problem by adding the following line to /etc/crontab: @reboot root /bin/sleep 45 && /etc/init.d/cron restart Thus, when cron starts back up upon a reboot, it waits for networking to get up, then restarts the cron daemon. That fixes the problem of crontabs not being read at all for LDAP users. However, since it's the cron daemon being restarted and not the computer, @reboot entries are ignored. Is there a way for a user to make a command run upon restarting the daemon, rather than a reboot? Or is there a better solution to this overall problem? Thanks.

    Read the article

  • How to make a python script run in Anacron

    - by Jeremy
    I have a python script that I would like to run daily using anacron, but I haven't been able to get it to work. The script is in my home directory, and I have put a symlink to it in /etc/cron.daily/. I saw somewhere that things here can't have dots in the filename, so the symlink has the .py extension removed (the original file still has it). The python file does have #!/usr/bin/python on the first line. This is my first experience with cron / anacron, and so I'm sure I'm making a dumb mistake - I just don't know what it is. Is a symlink a problem? Do I need the actual file there? Is the python script the problem? Do I need to run a bash script that will open the python script? Is there something else I'm not thinking of?

    Read the article

  • Load login shell inside user cronjob

    - by sa125
    I'm trying to run a rake task using a scheduled cronjob. My crontab looks something like this: 0 1 * * 1-7 /bin/bash -l -c "cd ~/jobs/rake && rake reports:create >> ~/jobs/logs/cron.log" Ruby on my account is provided by RVM, which is loaded via ~/.bashrc (before the no-interaction check): # load RVM env [[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm # If not running interactively, don't do anything [ -z "$PS1" ] && return # ... rest of logic Time and again, this task fails to run since RVM isn't loaded when the task is called (uses system's /usr/bin/ruby instead), and gem dependencies are missing. How can I make crontab load my shell environment before executing my scheduled jobs? thanks.

    Read the article

  • s3cmd run on command line not on cron

    - by Jonar
    Many have said that the problem is with environment but I still can't seem to solve this problem. BTW I am using Ubuntu 9.10 login as user, then sudo -s using this command: s3cmd put file s3://bucket worked! now here is the simple script intended for testing: #! /bin/bash env >/tmp/cronjob.log s3cmd put file s3://bucket issuing the command crontab -e * * * * * /opt/script 2>&1 | logger Then using tail to syslogs Dec 3 23:22:01 ubuntu CRON[10795]: (root) CMD (/opt/script 2&1 | logger) But by verifying it on s3Fox Organizer, the file is not uploaded. (I tried changing the #! /bin/sh (no effect), putting crons on /etc/crontab (no effect), setting HOME=/home/user (no effect) What are other options to try? Or other ways to debug this problem. Thanks

    Read the article

  • crontab not executing all lines

    - by kiasecto
    I have a sudo crontab like this to sync time: # m h dom mow dow command 0 6 * * * ntpdate 10.3.3.3 >> /var/mylog/ntp.log 0 7 * * * /var/mylog/backup.sh >> /var/mylog/backup.log The problem I am having is that the first line (ntpdate) never seems to execute. If I run it manually with sudo that line works. cron does run the backup.sh at the 7, but it never executes then ntp sync at 6. The syslog doesn't seem to show anything. System is Ubuntu 10.04 LTS.

    Read the article

  • Help with running crontab from root

    - by user242065
    Im using OSX and having trouble getting a cron job to run. I type the following: $ sudo -i $ crontab -e I then enter: * * * * * root ifconfig en0 down > /dev/null 0 19 * * * root ifconfig en0 down > /dev/null 0 7 * * * root ifconfig en0 up > /dev/null and no success, the first line is for testing. I want it to shut off my internet. The next two lines I plan to leave in, once I get this working. If I type this in to the terminal the internet goes off ifconfig en0 down Why is my cron job not shutting down the internet? FYI: This is a follow up question from http://stackoverflow.com/questions/3027362/how-can-i-write-a-cron-job-that-will-block-my-internet-from-7pm-to-7am-so-i-can most of the comments there are people making fun of me. And a few attempts to solve the problem with out cron jobs.

    Read the article

  • crontab doesn't work on centos 6

    - by sbxmal
    /etc/crontab: SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly */2 * * * * /usr/bin/php -q /home/dorsen/public_html/cron-test.php */2 * * * * http://www.mysiteurl.com/cron-test.php - also doesn't work If i run this file directly in browser - all fine What i did : root@vded10625 [~]# yum remove cronie-anacron .... Complete! root@vded10625 [~]# yum install cronie-noanacron sysstat .... Complete! root@vded10625 [~]# service crond start Starting crond: [ OK ] root@vded10625 [~]# chkconfig crond on root@vded10625 [~]# service crond restart Stopping crond: [ OK ] Starting crond: [ OK ] Will be pleased for any help

    Read the article

  • what is the meaning of *this* crontab setting?

    - by aXqd
    * */1 * * * sh foo.sh I found this setting on one production machine. And foo.sh was executed every one minute. I am guessing that the original author of this setting wants it to be executed every one hour. And I cannot find the official meaning of this setting in the crontab man page. Hence please help. UPDATE: I extracted these logs from that machine, however I cannot find the law out of them. 2013-06-29 20:47:01 2013-06-29 20:50:02 2013-06-29 20:51:01 2013-06-29 20:53:01 2013-06-29 20:54:01 2013-06-29 20:57:01 2013-06-29 20:58:01 2013-06-29 21:00:01 2013-06-29 21:05:02 2013-06-29 21:10:02

    Read the article

  • Crontab stopped unexpectedly

    - by naka
    I have following entries in the crontab: 0 0 * * * /mnt/voylla-production/releases/20131111011431/script/rubber cron --task util:rotate_logs --directory=/mnt/voylla-production/releases/20131111011431/log 0 4 * * * /mnt/voylla-production/releases/20131111011431/voylla_scripts/cj_daily.sh 0 2 * * 6 /mnt/voylla-production/releases/20131111011431/voylla_scripts/cj_saturday.sh I worked fine until today. It didn't run as scheduled after a capistrano deploy, didn't get a mail either. It worked fine earlier, and I am unable to understand what wrong. The only change that was made was the deploy, but I think it should not affect the cron. I tried using pgrep cron to see if crons is working. It gives 904 as output. Could someone please help. Thanks

    Read the article

  • How to configure in crontab with condition statement for checks

    - by chz
    We like to monitor the NAS storage mounted on a linux box. We only like to be notified via mail when the usage exceeds a certain number say 80. We have only seen in linux books where most of them are calling shell scripts at certain times. How do we write inside crontab to only mail us if it exceeds 80 ? Usual eg 2 2 * * * /home/someUser/script.sh 2&1 | mail [email protected] Looking for solution like below 2 2 * * * if [ someNumber "80" ] ; then /home/someUser/script.sh | mail [email protected] Sincerely

    Read the article

  • Crontab -- scheduling my backups

    - by Garfonzo
    I want to do a backup every Friday night (no, this is not the whole backup routine, just part of it). Each Friday night's backup will not be overwritten until 4 weeks later. So, essentially, I have a four revolving backups: Week1, week2, week3, and week4. Now, I need the week1 backup script to run every 4 weeks. But I also want week2's script to run every four weeks. I know that I can tell the crontab to execute something every X weeks/days/hours/whatever. However, how do I set it up so that each of these four scripts actually run on different weeks, how do I avoid all 4 scripts running on the same night, then dutifully waiting for weeks only to all run again? Thanks.

    Read the article

  • Run a shell script using cron

    - by Blanca
    Hi! I have this FeedIndexer.sh: #!/bin/sh java -jar FeedIndexer.jar Just to run FeedIndexer.jar which is in the same directory as the .sh, I would like to run it using crontab, so I did this: # /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) 01 01 * * * root run-parts --report /home/slosada/workspace/FeedIndexer/target/FeedIndexer.sh # But it doen't work. Have i made any mistake?? Thank you!

    Read the article

  • apache-user & root access

    - by ahmedshaikhm
    I want to develop few scripts in php that will invoke following commands; using exec() function service network restart crontab -u root /xyz/abc/fjs/crontab etc. The issue is that Apache executes script as apache user (I am on CentOS 5), regardless of adding apache into wheel or doing good, the bad and the ugly group assignment does not run commands (as mentioned above). Following are my configurations; My /etc/sudoers root ALL=(ALL) ALL apache ALL=(ALL) NOPASSWD: ALL %wheel ALL=(ALL) ALL %wheel ALL=(ALL) NOPASSWD: ALL As I've tried couple of combination with sudoer & httpd.conf, the recent httpd.conf look something as follows; my httpd.conf User apache Group wheel my PHP script exec("service network start", $a); print_r($a); exec("sudo -u root service network start", $a); print_r($a); Output Array ( [0] => Bringing up loopback interface: [FAILED] [1] => Bringing up interface eth0: [FAILED] [2] => Bringing up interface eth0_1: [FAILED] [3] => Bringing up interface eth1: [FAILED] ) Array ( [0] => Bringing up loopback interface: [FAILED] [1] => Bringing up interface eth0: [FAILED] [2] => Bringing up interface eth0_1: [FAILED] [3] => Bringing up interface eth1: [FAILED] ) Without any surprise, when I invoke restart network services via ssh, using similar user like apache, the command successfully executes. Its all about accessing such commands via HTTP Protocol. I am sure cPanel/Plesk kind of software do use something like sudoer or something and what I am trying to do is basically possible. But I need your help to understand which piece I am missing? Thanks a lot!

    Read the article

  • Running an Automator task at night

    - by Roberto Aloi
    I've just created an Automator workflow and I'm using crontab to execute it at night. The problem is that, after a while, the machine is going to sleep and a password is required (this is the intended behaviour). Unfortunately, Automator seems to be unable to perform the task when the password is required. It works like a charm if the "password required" dialog is not displayed (before the sleep). Any suggestion on how to solve this?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >