UNIX Command to run cron jobs

Is there a UNIX command I can send to the target machines to force them to run the 'Daily, Weekly, & Monthly' cron jobs?
Do you guys know of a place that I can find useful commands to send to the machines?

Send:
periodic weekly
This command will run, right now, all the system maintenance commands which normally run via cron only at 4:30 on Saturday morning. To see the actual maintenance commands that are going to be executed, look in /etc/periodic/weekly. You can also do "periodic daily" or "periodic monthly".

Similar Messages

  • How to Run cron Jobs(Schduled jobs)

    HI all,
    I am runnig one webapplication in resin.In resin web.xml run at tag like below
    <run-at>01:50,03:50</run-at>This tag is used for runnig some periodic jobs.I want to cleanup the database every day at above mentiond timings.But in tomcat htere is no option like that.Is there any way to develope cron jobs please help me.
    Thanks in advance

    Do you have other tasks in cron?
    I will assume not. You have to make sure you have permissions to do cronjobs.
    If so, then just type crontab -e
    From here you can use the following guideline to make your cronjob. Also source your .profile or whatever in your shell script.
    Minute = Minute of the hour, 00 to 59. * Will indicate every minute (details later)
    Hour = Hour of the day in 24-hour format, 00 to 23. * Will indicate every hour (details later)
    Day = Day of the month, 1 to 31. * Will indicate every day (details later)
    Month = Month of the year, 1 to 12. * Will indicate every month (details later)
    Day = Day of the week, 3 chars - sun, mon, tue, or numeric (0=sun, 1=mon etc).... * Will indicate every day (details later)
    Task = The command you want to execute
    So if I had a shell script called runme.sh and in it it called my .profile (which sets my oracle_home and path etc) and it also called sqlplus and ran my script this is how I would set it up. Let's assume we want it to run 10 minutes after midnight every night.
    10 0 * * * runme.sh
    Let's assume you want a log, then it can look like this.
    10 0 * * * runme.sh 1> path/filename.log 2> path/errorlog.err
    If you wanted to just run it from Monday through Friday, then do this.
    10 0 * * 1,2,3,4,5 runme.sh
    Hope this helps.

  • UNIX command to run remotely?

    Does anyone know the UNIX command to generate a list of installed applications in the Applications folder AND their version numbers?

    Hi
    Using ls /Applications is OK up to a point. I think using system_profiler might be better? Something like:
    system_profiler SPApplicationsDataType
    Should give you what you want? Be prepared to be patient as it will list every application/utility and could take some time. On 10.6 you may see the first few entries referring to "System Flippers etc" You can safely ignore these
    On a side note I've never had a problem with ARD (going back years) gathering reports. I would try and fix that problem when you get the chance.
    Tony

  • Environment setting for cron job

    What are necessary oracle varaibles to run a oracle job from crontab.
    does any one has some example. I can run er export job from the command line but when i scheduled that from crontab, it did not run. I need to set environment for that but my knowledge in unix is close to zero. ur help will be hughly appreciated. Thanks

    Basically following 3 variable needed to run cron job
    ORACLE_SID=<SID>
    ORACLE_HOME=<ORACLE_HOME>
    PATH=$ORACLE_HOME/bin;$PATH
    - Virag

  • Unix command from pl/sql

    How can I call a unix command or run a c program
    from a stored procedure in oracle 9i.

    Or if you want to do a host call then implement the following class as a Java stored procedure.
    import oracle.jdbc.*;
    public class util
    // Executes an operating system command. The command shall be fully qualified.
    // The Java connects with silent login. No environment set-up files are run
    // and no path is set. The mode can be "sync" or "async" for respectively
    // synchronous and asynchronous execution
    static public int OSCmd(String cmd, String mode, String[] output)
    throws IOException, InterruptedException
    System.out.println("OSCmd "+cmd+" ("+mode+")");
    output[0]="";
    // start command
    Process proc = Runtime.getRuntime().exec(cmd);
    if (mode.equals("sync"))
    // get command's stdout and stderr
    InputStream stdout = proc.getInputStream();
    InputStream stderr = proc.getErrorStream();
    String str;
    // Stdout
    BufferedReader br = new BufferedReader(new InputStreamReader(stdout));
    while ((str = br.readLine()) != null)
    output[0]+=str+"\n";
    br.close();
    // Stderr
    br = new BufferedReader(new InputStreamReader(stderr));
    while ((str = br.readLine()) != null)
    output[0]+=str+Long postings are being truncated to ~1 kB at this time.

  • Terminal/Unix Command to Mount External USB Drive?

    I am having a probelm with the directory on an external HDD. The "device" is showing up in the utility software (DRIVE GENIUS/DISK UTILITY) but not the "volume," so it can't affect any repairs except INTIALIZE. So, I'm presuming the drive is physically okay - just the directory is fouled up. Is there some unix command to run that will repair the directory in some manner? Thanks!

    Hi Metroxing,
       What you presume is not a given but yes, the existence of the device file greatly decreases the relative probability of your having a hardware problem. However, I have a question. I'm not sure of what you mean by the term "directory".
       In "UNIX" jargon a directory is that which in "Mac" jargon would be a filesystem "folder". However, there is another data structure in the filesystem that I think is called a "directory". I assume that's simply an abstraction of the Catalog B-Tree and related files. I know about this use of the term "directory" from discussions and readings on Alsoft's DiskWarrior. That is supposed to do exactly what you want, "rebuild the directory structure", and is a relatively inexpensive "best-of-breed" solution.
    Gary
    ~~~~
       Imitation is the sincerest form of television.
             -- Fred Allen

  • Error when using try catch inside oledb command to run stored procedure

    Hi,
    i'm using the below command to run some jobs  using OLEDB Command
    exec sp_start_job @job_name =?
    and it runs successfully
    when i put this code inside try catch block as below , it generates error and don't accept it
    begin try
    exec sp_start_job @job_name =?
    end try
    begin catch
    end catch
    the error message is "Syntax error, PErmission vaiolation or other nonspecific error"
    do you know is there any problem using TRY catch insdie OLEDB command ?
    Thanks ,
    Ahmed Salah

    Hi Ahmed,
    According to your description, if an error raised that fails the package, then you want the package to continue execute.
    To achieve this requirement, we can use Integration Services (SSIS) Event Handlers that we can create custom event handlers for an OnError event when an error occurs to continue processing rest of the package. For more details, please refer
    to the following blog:
    http://visakhm.blogspot.in/2013/03/error-handling-in-ssis-loops.html
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Automator send unix command

    I am making a Automator script for ARD that lets me pick a computer list then run a unix command that runs softwareupdate.
    How is there a script will show the results of the command?
    I would like to have it display the updates that are need then I can have it run the command again and update the system.
    Anyone know about Automator

    You might be able to automate copying the report output to the clipboard and saving it that way, or through Automator and/or AppleScript (triggering the script through Automator), it might be possible to save the report directly, though I don't see anything obvious in the AppleScript dictionary for ARD that would make that possible. If no one else here has an idea, you might take the question up in the Automator or AppleScript forums.
    It would take a lot of AppleScript work to parse out the name of the update, though, if you want to fully automate the process rather than you just manually typing in the name of the update in the softwareupdate command.

  • 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

  • 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.

  • Cron job not running - script uses rsync, ssh (with id_rsa)

    Does anyone know how to get cron to run a rsync/ssh script which uses id_rsa for passwordless logins?
    I have a backup script I have slaved for months over that works wonderfully when running it from the command line.
    It uses rsync and connects with SSH (passwordless using ssh keys). I have setup id_rsa and id_rsa.pub for passwordless logins (this is my user account, and connects using root@ to the server)
    As stated all works find when run from the command line. But when I setup a cron job to run this file (exact same line I run from the command line) it does not execute. Actually, it does run, as I have an email notifiction which sends to me. It is just the rsync/ssh part that does not run.
    I have spent days and days trying to figure it out. No error messages occur, nothing.  Took me a while to find out cron is emailing the user account on Lion the messages (not to a proper email address).
    The error shows a permission denied, which I believe to be the cron user cannot use the id_rsa/ssh connection.
    Cron is running the script as my user, the same I use on the command line. I even tried copying the id_rsa to the root user .ssh folder in case cron is running as root but that does not work either.
    So does anyone know how to get cron to run this rsync/ssh script which used id_rsa for passwordless logins?
    Thanks a lot

    YES! Got it working, finally!
    So the issue is indeed cron/launchd not being able to access the ssh-agent which holds the key.
    So this is the solution...
    Download keychain for Mac:
    http://www.funtoo.org/wiki/Keychain
    Then once its installed and configured, the script to run needs this added to the top:
    eval `keychain --noask --eval id_rsa` || exit 1
    Note I am using id_rsa whereas keychains instructions refer to id_dsa so I just changed it and it works OK.
    When the script runs the first time it asks for the key password. Then it works from then on.
    What I do not know yet is will I need to re-enter the password when I logoff/logon again. That will cause an issue as I auto restart the Mac every day which means if I am off for a few days backup will stop (can you see the madness in this issue!).

  • 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)

  • 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

  • DBMS vs unix Cron job

    We have a web application using Oracle 8.1.7. When the user enters a process button on the web we want to run the procedure in the background and we also have some jobs that needs to be run in a scheduled time. My dba is telling us to use cron in place of dbms job. He thinks it is easy to maintain. Are there any new utilities in 8i besides dbms job. Can some body give me pros and cons on these processes.
    thank you

    DBMS_JOB only runs PL/SQL. If you need to do OS stuff as well, then a shell script is your only man, hence cron.
    For pure database jobs, then I would suggest that DBMS_JOB is a better bet, primarily because you don't have the problem with using two different clocks. Generally I find it easier to manage everything from the database. Howver if your DBA has lots of existing cron jobs for OS things that he needs to co-ordinate with these database things then cron probably will make live easier for him.
    As for runninmg stuff from a user command, I would suggest that DBMS_JOB is the way to go, because it can handle a one-off submission. Again, unless there's lots of OS activity that needs to be managed as well.
    rgds, APC

  • Cron job : how to run scripts as cron job

    Hi friend,
    Sorry one very small question ..
    Can someone tell me how can i run scripts as cron job .. on HP UX.
    thanks
    ashish

    Hi Ashish,
    open one telnet session.
    crontab -e
    then give the periodicity day and time
    like below
    05 00 * * 1-6  /usr/local/bin/database_backup.sh
    and now create the script file with the command or script to execute.
    Regards
    Ashok Dalai

Maybe you are looking for

  • Configure plain http adapter for receiving message from an external system

    Hi, we use Pi/700. Now I have an external system and I have to use HTTP (plain) to send messages to XI (via plain http adapter). I have no experiences with HTTP! In the external system I can only configure "URL, Username, Password" for sending messag

  • Report BOM and routing

    Hello, Is there any transaction in which I can see both the order-BOM and the routing of all components?

  • How do I transfer my Adobe CC software to my new computer?

    Hi there, I am switching from from my current MacBook to a new MacBook and I would like a step by step guide as to how to transfer my Adobe CC software to my new computer? Regards, Natalia

  • Internet Explorer and Adobe home page.

    I'm having a problem with the flash player in Internet Explorer. I've removed all older versions and installed version 9 (ActiveX). If I open Adobe's Home Page all I see in the box where the animations supposed to be is a black box. If I directly got

  • Tweaking FM_Outputs_Conditional_Text.jsx

    I found what sees like a bug in C:\Program Files (x86)\Adobe\AdobeFrameMaker10\Samples\ScriptsAndUtilities\Conditional Text\FM_Outputs_Conditional_Text.jsx. The script produces two PDFs, which I expected to be named <book_name>_Comment_Red.pdf and <b