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.

Similar Messages

  • 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

  • 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

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

  • 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

  • WLST script not running in CRON...

    i have written a WLST scrit to connect to WLS and find the DS driver Information ....the script runs pretty good when i manulay run it ...however when i added the script to CRON it just invokes WLST and fails...I have the shell script (.sh) first set the env by invokin <WLS-HOME>/server/bin/setWLSEnv and then execute the WLST script....like i said everything is fine when run manually but the cron job fails......
    when i chek the log file for the output i just see this
    Initializing WebLogic Scripting Tool (WLST) ...
    Welcome to WebLogic Server Administration Scripting Shell
    Type help() for help on available commands
    but when run manually its connecting....
    There is no ownership issue as such coz other cron jobs with the same owner run succesfully....!!!
    Please advise......
    Thanks in advance....
    Edited by: user10620079 on Feb 6, 2009 11:42 AM

    Thnaks for all your replies....
    I actually just made this change ...
    instead of setWLSEnv...i invoked setDomainEnv.sh and then cd to the dir where i have the .py script and the rest as it is and now it works...!!!!!!
    This tells me that may be setWLSEnv doesnt set all the required env variables for the .py script to run in cron....correct me if am still doing something wrong!!!!
    Thanks all for your help really appreciate it!!!!
    Edited by: user10620079 on Mar 16, 2009 1:20 PM

  • 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

  • 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

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

  • DS run longer with scheduled job as compare to manual run

    I have scheduled a job through Management Console (MC) to run everyday once at 
    certain time. After some time, maybe after 15 days of running, the execution 
    time has increased to double from 17 mins to 67 mins by one time jump. After 
    that, the job kept running and spent 67 mins to complete.
    The nature of the job is to generate around 400 output flat files from a 
    source db2 table. Under efficient running time, 1 file took around 2 seconds to 
    generate. But now it became taking 8 seconds to generate one file. The data 
    volume and nature of the source table didn't change, so that was not the root 
    cause of increasing time.
    I have done several investigations and the results as such:
    1) I scheduled again this job at MC to run for testing, it would take 67 mins 
    to complete. However, if I manually run this job thorough MC, it would take 
    17 mins efficient time to run.
    2) I replicated this job to a second job as a copy. Then I scheduled this 
    copied job at MC to run, it would take 67 mins to run. But if I manually run 
    this job through MC, it will take 17 mins to run.
    3) I created another test repo and load this job in. I scheduled the job to 
    run at this new repo, it would take 67 mins to run. If I manually run the job 
    through MC, it only took 17 mins to run.
    4) Finally, I manually executed the job through unix job scripts command, 
    which is one of the scheduled job entry in the cron file, such as 
    ./DI__4c553b0d_6fe5_4083_8655_11cb0fe230f4_2_r_3_w_n_6_40.sh, the job also would take 17 
    mins to run to finish.
    5) I have recreated the repo to make it clean and reload back the jobs and 
    recreated again the schedule. Yet it still took 67 mins to run scheduled job.
    Therefore, the conclusion is why it takes longer time to run by scheduling 
    method as compare to manually running method?
    Please provide me a way to troubleshoot this problem. Thank you.
    OS : HPUX 11.31
    DS : BusinessObjects Data Services 12.1.1.0
    databasee : DB2 9.1

    Yesterday we had done another test and indirectly made the problem to go 
    away. We changed the generated output flat file directory from current directory 
    of /fdminst/cmbc/fdm_d/bds/gl to /fdminst/cmbc/fdm_d/bds/config directory to 
    run, to see any difference would make. We changed the directory pointing 
    inside Substitution Parameter Configurations windows. Surprisingly, job had 
    started to run fast and completed in 15 minutes and not 67 minutes anymore.
    Then we shifted back and pointed the output directory back to original 
    /fdminst/cmbc/fdm_d/bds/gl and the job has started to run fast ever since and all 
    completed in 15 minutes. Even we created ad hoc schedule to run and it was 
    still running fast.
    We not sure why it was solved by shifting directory away and shifting back, 
    and whether this had to do with BODS problem or HP Unix system environment 
    problem. Nonetheless, the job is started to run normally and fast now as we 
    test.

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

  • Is it possible to have a Cron job in CPO to check the running status of a workflow

    Is it possible to have a Cron job in CPO to check every hour to see if a particular workflow is running, if not trigger it by creating a alert, if yes- autokill

    Hi Warren,
    We don't want our process to expire and also not to execute twice at once. We have a provisioning wrapper workflow which is triggered one time by an alert and it runs endlessly by creating an alert at the end of each instance triggering another instance of the same unless CPO hangs or goes to stand by mode. Since we belong to service team, we don't have any kind of access to CPO DB or logs, so that possibility is ruled out. Just checking for alternatives. 

  • 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

  • Need advice on running timer based cron jobs

    Hi,
    We made a cool desktop product on Flex that runs on the Air environment. After having released it a while ago, we think about taking its performance to the next level by being able to mimic cron job like functionality based on timers.
    However, one of the setbacks for us while we tried to do something similar earlier was the Flash platform's single threaded architecture. So if we are running something resource consuming in the background, chances are that the UI might get stuck if a part of it is being rendered. That will make things looks ugly and we are trying to find ways to make it work.
    Can anyone recommend anything that would help?
    Thanks!
    Vivek

    > 1. What is the best fastest system AE can take advantage of? If we get 6 or 8 or 12 core Mac Pros (instead of the quad core) with more RAM, would AE be able to access that speed, and if so up to how many GB can it use, only up to 2GB per core or can it use more?
    Yes, After Effects will take advantage of multiple fast CPUs and all of the RAM that you can install.
    You also want to have a decent-sized SSD connected over a fast bus for the disk cache. The new Mac Pro does very well in that regard.
    2. Should we replace the graphics card with an Nvidia CUDA? Is the ray-tracing engine something we’ll need with Cinema 4D work?
    The After Effects ray-traced 3D renderer has nothing whatsoever to do with Cinema 4D.
    Do not make any buying decisions based on the  After Effects ray-traced 3D renderer unless you already know for certain that you have a need for it. Since you're asking, it seems that the answer is that you don't.
    See this page for information about hardware for Premiere Pro and After Effects: http://adobe.ly/pRYOuk

Maybe you are looking for

  • Load:Class * not found - in portal

    In the webgui /portal a link is provided. when you click the link , which is mapped with the transaction code of the ABAP program. gets displayed. THis program is used to download PO into the File server. so File output path is given. The user uses F

  • Daily Attendance

    Hi, Is it possible to mark daily learner attendance for a class in OLM? Thanks & Regards, Supriya

  • Error when accessing access manager admin console i.e amserver

    Hi all, I had installed SUNJES Update1,now when iam accessing the amserver,amconsole through browser iam geting the following error trace AMSERVER_ [22/Oct/2008:21:03:07] failure ( 760): for host 10.201.51.71 trying to GET /amserver/UI/Login, service

  • Has Adobe or Apple fixed the lack of PSB thumbnails?

    One of these two companies needs to get on the ball and make working with PSB files easier. 75% of our work files are PSB format. Adobe blames Apple and Apple doesn't seem to know what an Adobe is. We need a fix now, I don't care who comes up with it

  • The Force Quit-Not Responding Issue has not been resolved yet?

    I too keep having Force Quit issues in many apps - Final Cut, Photoshop, Mail, etc. If I do not use these apps for a while then go to them, they hang. Force quit does not work - as the app cannot be restarted after force quitting. The only solution i