Run a cron job every minute

Hi,
I would like to run a cron job every minute.
I can find cron.hourly, cron.daily, cron.weekly, cron.monthly in my /etc, but no cron.minutly.
Can I get it? What should I do?
Thanks!
Nathan

run
crontab -e
. this opens an editor. therein you type :
#min hour day month weekday command
*/1 * * * * <your command>
dw was faster
Last edited by DonVla (2008-11-17 16:56:42)

Similar Messages

  • Cron job ,every other monday

    hello
    i would like to schedule a cron job every other monday
    -- OS info
    [oracle@dev3 ~]$ uname -a
    Linux dev3.pcst3.net 2.6.18-194.17.1.0.1.el5 #1 SMP Wed Sep 29 15:57:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linuxhere is what i have in for cron job , yes this shows every monday but i am looking for every other monday,it ran today(03/26),next runs should be 04/09 and 04/23 ....
    # Bi-weekly report
    30 11 * * 1 /u01/scripts/monday_query.sh > /u01/scripts/monday_query.log 2>&1here is what we have in monday_query.sh
    #!/bin/ksh
    # set -xv
    . dbbash_profile
    export ut=/u01/scripts/ut
    export pass=`grep -i ls011 $ut/pwdfile | awk -F":" '{ print $2 }'`
    sqlplus  ls011/${pass} < /u01/scripts/monday_query.shany help is much appreciated to make this run every other monday
    Please help

    From the cron man page: http://unixhelp.ed.ac.uk/CGI/man-cgi?crontab+5
    "Step values can be used in conjunction with ranges. Following a range
    with ``/<number>'' specifies skips of the number's value through the
    range. For example, ``0-23/2'' can be used in the hours field to spec-
    ify command execution every other hour (the alternative in the V7 stan-
    dard is ``0,2,4,6,8,10,12,14,16,18,20,22''). Steps are also permitted
    after an asterisk, so if you want to say ``every two hours'', just use
    ``*/2''."
    Or, create a flag file with 'touch ran_cron_job_last_monday' after a Monday that you ran the script.
    Then throw a condition into your script to check for the file. If the file exists, remove it. If the file doesn't exist, then run your script and when finished, create the file again.
    For example:
    #! /bin/ksh
    if [ -e ran_cron_job_last_monday ] ; then
    rm -f ran_cron_job_last_monday
    else
    touch ran_cron_job_last_monday
    exit 0
    fi
    ... do here what your script is supposed to do ....
    exit 0

  • Manually running a cron job in SunOS 5.8

    I was looking in the Solaris documentation and UNIX Man pages, however how do I manually run a cron job that is already set-up? I am troubleshooting an issue and the cron job runs just fine during the night, I would like to execute it manually for testing purposes. Thank you in advance.

    Run this command :
    crontab -l
    And, look for the command you want to run and then just execute it on command line. The first five columns (separated by spaces) are date/time/day (skip those), after that you will see full path of the script/program. Just copy and paste that full path on command line.

  • Solution Manager 7.1 - Monitor scripts which runs as cron job at OS level ?

    Hi All,
    We have Solution Manager 7.1 in our landscape and we have configured RCA, Monitoring.. Is it possible to Monitor the scripts running as Cron Job at the OS level?
    If in case, the script stops due to an issue, we need to get the alert in Solution Manager.
    Also can you please let us know whether it is possible to monitor jobs scheduled through external job scheduling tool.
    Thanks & Regards,
    Vaishali.K

    Hi,
    How to Schedule the background Job at the OS level:
    Invoke a sapevent using a OS script and then have a SAP background job set to run on a sapevent. I say this assuming Unix and a job in crontab. I would guess the same thing could be done on a Windows system.
    sapevt TRIGGER_NAME -t
    pf=d:usrsapDEVsysprofileDEV_DVEBMGS00_SVRNAME nr
    Kindly go through the links,hope this will help you out
    [Steps to configure RCA and Monitoring in SolMan;
    [http://help.sap.com/saphelp_45b/helpdata/en/c4/3a7ef8505211d189550000e829fbbd/content.htm]
    Thanks & Regards
    Ajitabh

  • DBA scripts run by cron job

    We've got a development database on which we're working every day. We intend to set up a cron job to run about once a week to help in the maintainance & performance of the database.... analyzing tables, stuff like that. Does anybody have any suggestions as to what scripts it's useful to run to help keep things running smoothly?
    We're using 9.0.1
    Cheers
    RT

    We've got a development database on which we're working every day. We intend to set up a cron job to run about once a week to help in the maintainance & performance of the database.... analyzing tables, stuff like that. Does anybody have any suggestions as to what scripts it's useful to run to help keep things running smoothly?
    We're using 9.0.1
    Cheers
    RT i'd suggest you try out oracle enterprise manager and look at the list of events you can test for. You can use this list to implement in cron or let OEM do it for you. You'll find test like, is the listener up, is the db up, is the server up, what tablespaces will not be able to extend, if a disk is getting fulletc and stuff like that . Those items should help you frame your scripts for cron if you like.

  • Shell Script gives error when run through cron job.

    Hi,
    The following shell script runs without any problem when executed manulally.
    USED=$(df -h /arch | tail -1 | awk '{print $5}' | cut -d '%' -f 1)
    if [ ${USED} -gt 90 ]
    then
    find /arch/AUBUAT/ -type f -mtime +0 | xargs rm
    find /arch/AUBMIG/ -type f -mtime +0 | xargs rm
    fi
    But the same gives below error when called from a cron job:
    /backup/arch_test.sh: syntax error at line 1: `USED=$' unexpected
    We are running following version:
    bash-3.00$ uname -a
    SunOS uaeaubdbdr01.aub.af 5.10 Generic_141444-09 sun4u sparc SUNW,SPARC-Enterprise
    Kindly assist.
    Thanks
    Edited by: user13362786 on Apr 20, 2011 4:36 AM

    Hi,
    When I used #!/usr/bin/sh now even the manul execution of the script fails with the same err:
    bash-3.00$ ./arch_test.sh
    ./arch_test.sh: syntax error at line 2: `USED=$' unexpected
    And when I used #!/usr/bin/ksh the manual execution runs fine but again when the script is run from cronjob it now give dirrect err:
    /backup/arch_test.sh[2]: df: not found
    /backup/arch_test.sh[2]: tail: not found
    /backup/arch_test.sh[2]: cut: not found
    /backup/arch_test.sh[2]: awk: not found
    /backup/arch_test.sh[3]: test: argument expected

  • Cron job every 4th Saturday

    I have a 'ditto' command that I'd like to run every 4th Saturday.
    Can anyone advise how I should set crontab?

    In short, you can't do this in one step.
    You might think you can do something like
    0 0 22-28 * 6 /path/to/ditto blah blah blah
    which most people would interpret as run at midnight on every day between the 22nd and 28th of the month that happens to be a Saturday, but cron actually interprets this as 'run every day between 22-28 and also on Saturdays' which isn't what you want.
    The easiest solution is to write a wrapper for your ditto command. Have your crontab call your script on one of the parameters (e.g. every day between the 22nd and the 28th) and the first thing your script does is check if the day is the other condition (e.g. Saturday). If it isn't, it gracefully exits.
    This wrapper script could be as simple as:
    #!/bin/sh
    DAY="`date +%u`"
    if [ "${DAY}" = "6" ] ; then
       echo "Saturday - time to backup"
       # ditto command goes here
    else
       echo "Not Saturday - do nothing""
    fi

  • Program that run a cron job in EP?

    Hi All,
    My requirement is :
    if a user upload a file to the specified folder in EP repository. (file will be .txt format), b'z they are the big customers to our client, so that they can just upload the order file.txt in a specified folder.
    after uploading a file to that folder or directory, i need to develop one program that will pick the file from a folder or directory for every 10 or 15 mins, need to place the orders in SAP R/3.
    Can anybody pl help me in this.
    Pl send me any source code or logic.
    Help appreciated with Reward Points.
    Thx
    Pradeep

    Hi Pradeep,
    for both things wizards exist in NWDS, just right-click on yur project, choose "Service, Filter and Scheduler Task Generation" and go on...
    See http://help.sap.com/saphelp_nw04/helpdata/en/3d/b5842eb8a911d5993900508b6b8b11/frameset.htm for the scheduler service and for some predefined scheduler tasks and click around the configuration within EP to understand the settings behind them.
    For implementation, see Did you know you can schedule jobs in portal using KM's Scheduler Task? and new Scheduler Task for example
    For RepServices, see http://help.sap.com/saphelp_ep60sp2/helpdata/en/69/d96b86a84611d5993600508b6b8b11/frameset.htm for the RepService description and for some predefined repository services and click around the configuration within EP to understand the settings behind them.
    For implementation see /thread/15093 [original link is broken] and the link given there.
    If questions stay, first look around the forum, many threads have been opened for these issues.
    Hope it helps
    Detlev

  • Cron Job and PHP

    I am having problems running a cron job every one minute that calls a PHP script. Please see below:
    1 * * * * /usr/bin/php /Library/WebServer/Documents/secureohs/publichtml/reassignMSCcomptrack.php
    If I execute the command above, it runs just fine.
    Thank you in advance.

    I guess it would :)
    btw, how did this piece miss from the contents pasted by the OP ?
    The doc has given all details of CRON and missed where to see the logfiles. :)
    ****Added****
    I tried man crontab in windows, i dont see it.i overlook most of the things, i would have done the same ;)
    Edited by: Bobcatalog on Oct 23, 2008 9:40 AM

  • Reg Cron Jobs

    hi,
    I need to run a cron job every alternate wednesdays...in a year
    Any suggestions????
    Thnx,
    Enz

    Method 1: Run a cron job every wednesday. Run your job if `date +%U` is even.
    problems: Some years will have 53 wednesdays, so eventually you'll run your job on consecutive weeks.
    Method 2: Run a cron job every wednesday. Set a file as a sentinel. If clear, set it and run your job. If set, clear it and dont' run the job.
    problems: If the cron job fails to run, your "alternate week" might get out of sync. Someone might screw up the sentinel file.
    Pick one based on your needs
    Darren

  • I need to run the job  every 8th of the month

    Hello,
    Can you please help me out to run the oracle job every 8th of the month.
    Thanks in advace
    Kind reagrds,
    Nick

    Untested, but I'd say the repeat_interval clause of dbms_scheduler.create_job should be something like:
    'FREQ=MONTHLY;BYMONTHDAY=8;'

  • Can we run ICM Admin script every mimute ?

    Hi
    I have a requirement to run one Admin script every minute , does it make any overload to central controller ? . Anyone is using the same in production system?
    Regards
    Renni john

    I concur, I have a customer with many admin scripts checking time of day every minute for different locations and this is extremely busy contact center and we have never seen any related performace issues.
    Chris

  • Pacman -Syu as a CRON job?

    OK, ... before the flames errupt ... I'm not managing any mission-critical systems.
    My interest in 'pacman -Syu' as a CRON job is for personal and friend's systems.  I'm wondering if you could post your cron scripts as an example for me to learn from.  How to you prefer to set your pacman.conf for this sort of thing?
    I'm mostly interested in the security benefits and new-features of using new/current packages by this automation.
    Thanx.

    I higly suggest you to do not run pacman as cronjob, but anyway there is nothing particular to do.
    At first ensure you have crond configured and running.
    Then just go into /etc/
    there are some directory with cron.[something]
    chose with which frequency youw ant to run the cron job
    then just create a file in the appropriate directory
    For pacman it shoul look like
    #!/bin/sh
    pacman -Syu
    I suggest you to use the
    IgnorePkg = <package> [package]
    in pacman config file in wich you specify wich package MUST NOT be update, for instance lilo.
    Consider that and indiscriminate automatic updating can potentially leed to an unsuable system.

  • Cron job help- Need to run the Autobuddy command every night...

    I have not written anything in the form of a Unix script for YEARS and YEARS. Our XServe was built in Advanced mode, currently running 10.5.4 Server. On this box, we are running Wiki and iChat. Since we built this box as an Advanced box the "Autobuddy" option was not available.
    I have since enabled it at the command line, but I am told by Apple that there still needs to be a command run after every time a user logs in if you want others to Autobuddy. That command is this:
    "sudo /usr/bin/jabber_autobuddy -m"
    Now I think this would be pretty easy to setup as an automatic cron script, but like I said, I have not written something like this in forever. Not to mention, I am not 100% sure what needs to happen since running the script with an sudo command will prompt for the root password.
    I was wondering if anyone would be able to help me write the script up, and give me some instructions on how to install it. I just want it run everyday, midnight is fine, I don't really care. All I know is that we have a dept of 150 people, and it grows and shrinks all the time. They can deal with a new user not being seen for 24-48 hours, I just want to get this automated.
    Any helps would be GREATLY appreciated!
    Thanks
    Tom

    If you want to keep it simple try [CronniX|http://www.abstracture.de/projects-en/cronnix] a graphical tool for setting up CRON jobs on OSX. Whilst I have not actually done an autobuuddy in this way, I cannot see any reason why it will not run as a Cron Job.
    The proper way ideally would be to use the launchd service.
    Something like this should work:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>org.jabber.dailyautobuddy</string>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/bin/jabber_autobuddy</string>
    <string>-m</string>
    </array>
    <key>LowPriorityIO</key>
    <true/>
    <key><UserName></key>
    <string>admin</string>
    <key>StartCalendarInterval</key>
    <dict>
    <key>Hour</key>
    <integer>0</integer>
    <key>Minute</key>
    <integer>05</integer>
    </dict>
    </dict>
    </plist>
    (not sure why, but tabs are not showing up, making this hard to read)
    Message was edited by: Tim Harris

  • [SOLVED] Cron Job that starts every 30 minutes from boot

    I wish to have a cron job that runs a script every 30 minutes from boot, without any users logging in.
    I know about crontab -e, but I think that would I only run once i'm logged in. I've also heard about @reboot, but that would only run the script once.
    RabbidRabbit
    Last edited by rabbidrabbit (2012-01-31 20:14:13)

    Cron jobs will run whenever the system is up, regardless of whether or not anyone is logged in.
    I don't remember the syntax, but I know that at least some cron implementations have a way to run a job every 30 minutes, starting for the first time 30 minutes after reboot.
    EDIT: I just checked the syntax for fcron, which is what I use, and it seems like doing @ 30 your/command/here will make it run every 30 minutes of uptime.
    Last edited by kyla (2012-01-31 00:17:30)

Maybe you are looking for

  • Dynamic Text Feild with Dynamic Scroll Bar

    I have a Dynamic Text Feild with a dynamic Scroll bar. It loads a simple ASCI text file with some html formating. but I still can not manage to get the text to format. The biggest problem with the format is a big space between paragraphs. I am not su

  • ME59N ...Auto PO from PR issue

    Hi, I have two purchase req with two different vendors say vendor x and vendor y.when i run auto Po ME59N n the po is created it is a single PO with vendor X covering itmes of PR 1 and PR 2.Why is two POs not created since in PR both PR are having di

  • Building an array to a specified format..

    I'm trying to build an array that follows a specified output format. The user inputs columns & rows e.g. C x R...amd the the output should read C1 C2 C3 C4..... R1 V V V V.... R2 V V V V ... Where each V is not a constant, but a user inputed value. S

  • Corrupt install files

    i've tried downloading the latest version of itunes for pc atleast 3 times, each time i get a message saying that the files are corrupt and to try downloading them again...which i did. is there something wrong with the source files or is it something

  • Migration assistant did not transfer my files from pc to my mac, even though it says it did

    When i used the migration assistant to transfer my files from my pc to mac, it seems i could not find any of my files. it said it transferred successfully, but nothing shows up on my mac. I did it twice? what else do i need to do?