Howto run a script in the idle task
Hi all,
I successfully wrote and executed an idle task routine that periodically executes a simple method. now i need to add a functionality to that method so that it executes a simple javascript.
here is my code:
uint32 myTestIdleTask::RunTask(
uint32 appFlags, IdleTimer* timeCheck) {
if( appFlags &
( IIdleTaskMgr::kMouseTracking
| IIdleTaskMgr::kUserActive
| IIdleTaskMgr::kInBackground
| IIdleTaskMgr::kMenuUp))
return kOnFlagChange;
this->runTestScript();
return kmyTestFvExecInterval;
void myTestIdleTask::runTestScript() {
// this is the test script
PMString myTestScript("app.activeDocument.exportFile(ExportFormat.pdfType, File(\"/Users/testuser/testing.pdf\"),false);");
// i think i need to call CScriptRunner::RunScript()
// somewhere here but no success
Any help on how to execute the myTestScript Javascript code from the runTestScript() method?
Thanks in advance,
Hakan
Dear Hakan
I read your post, I'm really very happy to say, B'coz I'm also struggle to run the "JavaScript" through VC++ coding,
I need your help to run the below script.
Code:
var myOs = getOs();
alert(myOs);
function getOs() {
if( $.os.substring(0, 7)=="Windows")
myUser = $.os;
return myUser;
else if($.os.substring(0, 7)=="Mac Os")
myUser = $.os;
return myUser;
I'm checking the OS. How to invoke this in to VC++ or run through VC++ coding. I'm creating the project using dollyxs.bat file.
Kindly give me a guideline to run the above script & help me.
Thanks in advance
Regards
T.R.Harihara SudhaN
Similar Messages
-
Running perl scripts off the preinstall script during a pkgadd
Hello,
I'm trying to build a custom package (apache2 + mysql + php + other stuff) and get stuck on some stone wall that I can't figure.
Correct me if I'm wrong in my assumptions, and if able, could you provide a work around ? Here it is :
- The preinstall script must be in /bin/sh , /bin/bash or any valid shell
- Must be run by root, 'f course
Now.. As I'm not that strong on bash/sh scripting, I tried to call a perl script off my preinstall script. Somehow my preinstall script just never call the .pl .
This leads me to my third assumption :
- It is impossible, not permissible to run other scripts from the preinstall script.
Basically the perl script checks for some users in /etc/passwd + /etc/group, checks for some directories, create a custom SMF manifest, etc etc . I pretty much want the .pl script to be run.
The script itself is well packaged, correctly inserted in the package's pkgmap, and so on.
Any ideas ?
Thanks,
JeffThe script itself is well packaged, correctly inserted in the package's pkgmap, and so on.http://docs.sun.com/app/docs/doc/817-0406/ch3enhancepkg-10289?a=view
-
Run a Script after the MA is published to SAP ERP.
Hello, I'm trying to run a script after the MA is published, in order to automatically change it's status.
I already have the script done and working, the only problem is that I need to know where to put it (or what type of script it should be) in order to run after the MA has been published successfully.
Thanks in advance !
Oscar Obeso.That is also a good solution.
But what I did to fix it was to make a Script to run on validation.
Then, on that phase I checked the date of sent to external. If that date was null, it meant that Agreement had never been published.
Otherwise, it meant i had been published, and so I checked for the status to change it if neccesary.
Thanks for the answers, they are valid solutions too.
Oscar Obeso. -
How to run Powershell script (function) through Windows Task Schduler ??
Hello All,
i have Powershell script which is created as a function. I have to give parameters to run the script. And it is working fine. Now i want to run this script through windows task scheduler but it is not working. I dont know how to call powershell function
through task scheduler.
From command line i run it like this:
. c:\script\Get-ServiceStatusReport.ps1
dir function:get-service*
Get-ServiceStatusReport -ComputerList C:\script\server.txt -includeService "Exchange","W32Time" -To [email protected] -From [email protected] -SMTPMail mail01.xxx.gov.pk
In windows Task scheduler I am giving this: it runs but i dont receive any output :
Program/Script:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Parameter:
-file ". 'Get-ServiceStatusReport.ps1 -ComputerList C:\script\server.txt -includeService "Exchange","W32Time" -To [email protected] -From [email protected] -SMTPMail mail01.xxx.gov.pk'"
Please HELP !!!Thanks for the reply:
The script is already saved as Get-ServiceStatusReport.ps1 .
On powershell it does not run like .\Get-ServiceStatusReport.ps1 (parameter).
But i have to call it as function:
Like this:
Get-ServiceStatusReport -ComputerList C:\script\server.txt -includeService "Exchange","W32Time" -To [email protected] -From [email protected] -SMTPMail mail01.xxx.gov.pk
As you said:
I tried to run it like this:
Program/Script:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Parameter:
-file "c:\script\Get-ServiceStatusReport.ps1 -ComputerList C:\script\server.txt -includeService "Exchange","W32Time" -To [email protected] -From [email protected] -SMTPMail mail01.xxx.gov.pk'"
But its not working , on scheduler its giving error: (0xFFFD0000)
Please HELP !!!
WHOLE SCRIPT:
function Get-ServiceStatusReport
param(
[String]$ComputerList,[String[]]$includeService,[String]$To,[String]$From,[string]$SMTPMail
$script:list = $ComputerList
$ServiceFileName= "c:\ServiceFileName.htm"
New-Item -ItemType file $ServiceFilename -Force
# Function to write the HTML Header to the file
Function writeHtmlHeader
param($fileName)
$date = ( get-date ).ToString('yyyy/MM/dd')
Add-Content $fileName "<html>"
Add-Content $fileName "<head>"
Add-Content $fileName "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>"
Add-Content $fileName '<title>Service Status Report </title>'
add-content $fileName '<STYLE TYPE="text/css">'
add-content $fileName "<!--"
add-content $fileName "td {"
add-content $fileName "font-family: Tahoma;"
add-content $fileName "font-size: 11px;"
add-content $fileName "border-top: 1px solid #999999;"
add-content $fileName "border-right: 1px solid #999999;"
add-content $fileName "border-bottom: 1px solid #999999;"
add-content $fileName "border-left: 1px solid #999999;"
add-content $fileName "padding-top: 0px;"
add-content $fileName "padding-right: 0px;"
add-content $fileName "padding-bottom: 0px;"
add-content $fileName "padding-left: 0px;"
add-content $fileName "}"
add-content $fileName "body {"
add-content $fileName "margin-left: 5px;"
add-content $fileName "margin-top: 5px;"
add-content $fileName "margin-right: 0px;"
add-content $fileName "margin-bottom: 10px;"
add-content $fileName ""
add-content $fileName "table {"
add-content $fileName "border: thin solid #000000;"
add-content $fileName "}"
add-content $fileName "-->"
add-content $fileName "</style>"
Add-Content $fileName "</head>"
Add-Content $fileName "<body>"
add-content $fileName "<table width='100%'>"
add-content $fileName "<tr bgcolor='#CCCCCC'>"
add-content $fileName "<td colspan='4' height='25' align='center'>"
add-content $fileName "<font face='tahoma' color='#003399' size='4'><strong>Service Stauts Report - $date</strong></font>"
add-content $fileName "</td>"
add-content $fileName "</tr>"
add-content $fileName "</table>"
# Function to write the HTML Header to the file
Function writeTableHeader
param($fileName)
Add-Content $fileName "<tr bgcolor=#CCCCCC>"
Add-Content $fileName "<td width='10%' align='center'>ServerName</td>"
Add-Content $fileName "<td width='50%' align='center'>Service Name</td>"
Add-Content $fileName "<td width='10%' align='center'>status</td>"
Add-Content $fileName "</tr>"
Function writeHtmlFooter
param($fileName)
Add-Content $fileName "</body>"
Add-Content $fileName "</html>"
Function writeDiskInfo
param($filename,$Servername,$name,$Status)
if( $status -eq "Stopped")
Add-Content $fileName "<tr>"
Add-Content $fileName "<td bgcolor='#FF0000' align=left ><b>$servername</td>"
Add-Content $fileName "<td bgcolor='#FF0000' align=left ><b>$name</td>"
Add-Content $fileName "<td bgcolor='#FF0000' align=left ><b>$Status</td>"
Add-Content $fileName "</tr>"
else
Add-Content $fileName "<tr>"
Add-Content $fileName "<td >$servername</td>"
Add-Content $fileName "<td >$name</td>"
Add-Content $fileName "<td >$Status</td>"
Add-Content $fileName "</tr>"
writeHtmlHeader $ServiceFileName
Add-Content $ServiceFileName "<table width='100%'><tbody>"
Add-Content $ServiceFileName "<tr bgcolor='#CCCCCC'>"
Add-Content $ServiceFileName "<td width='100%' align='center' colSpan=3><font face='tahoma' color='#003399' size='2'><strong> Service Details</strong></font></td>"
Add-Content $ServiceFileName "</tr>"
writeTableHeader $ServiceFileName
#Change value of the following parameter as needed
$InlcudeArray=@()
#List of programs to exclude
#$InlcudeArray = $inlcudeService
Foreach($ServerName in (Get-Content $script:list))
$service = Get-Service -ComputerName $servername
if ($Service -ne $NULL)
foreach ($item in $service)
#$item.DisplayName
Foreach($include in $includeService)
write-host $inlcude
if(($item.serviceName).Contains($include) -eq $TRUE)
Write-Host $item.MachineName $item.name $item.Status
writeDiskInfo $ServiceFileName $item.MachineName $item.name $item.Status
Add-Content $ServiceFileName "</table>"
writeHtmlFooter $ServiceFileName
function Validate-IsEmail ([string]$Email)
return $Email -match "^(?("")("".+?""@)|(([0-9a-zA-Z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-zA-Z])@))(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,6}))$"
Function sendEmail
param($from,$to,$subject,$smtphost,$htmlFileName)
[string]$receipients="$to"
$body = Get-Content $htmlFileName
$body = New-Object System.Net.Mail.MailMessage $from, $receipients, $subject, $body
$body.isBodyhtml = $true
$smtpServer = $MailServer
$smtp = new-object Net.Mail.SmtpClient($smtphost)
$validfrom= Validate-IsEmail $from
if($validfrom -eq $TRUE)
$validTo= Validate-IsEmail $to
if($validTo -eq $TRUE)
$smtp.UseDefaultCredentials = $true;
$smtp.Send($body)
write-output "Email Sent!!"
else
write-output "Invalid entries, Try again!!"
$date = ( get-date ).ToString('yyyy/MM/dd')
sendEmail -from $From -to $to -subject "Service Status - $Date" -smtphost $SMTPMail -htmlfilename $ServiceFilename -
Need to run php script before the Flash component kicks in
I have a slide show component in Flash which uses an xml file to load images. The xml file, however, is created dynamically when the user selects which slide show they want to see. How do I run the php script BEFORE the slide show component has a chance to look for it? Usually it begins as soon as the .swf is run.
thanks,
chopthank you for responding.
I'm still new at as3 so forgive me for needing details.
I searched adobe for help and came up with the following to import the component. However, it seemed too easy to be true and so it was. I received errors when I ran it. The component is a commercial one called SlideshowBox and is in my library with that exact name.
//add a component to the stage
import fl.controls.SlideshowBox;
var aSlideshowBox:Button = new Button();
addChild(aSlideshowBox);
errors:
Scene 1, Layer 'Actions', Frame 1, Line 3 1172: Definition fl.controls:SlideshowBox could not be found.
Scene 1, Layer 'Actions', Frame 1, Line 3 1172: Definition fl.controls:SlideshowBox could not be found.
Scene 1, Layer 'Actions', Frame 1, Line 4 1180: Call to a possibly undefined method Button.
thank you, k -
Running 2 scripts using the browser simultaneously
I was wondering,
Is there a way to run two different AppleScripts using Safari at the same time, so that e.g. one would operate in one tab and the other in a different tab? How do I go about that? How do I avoid conflicts? (I should add that my knowledge of applescripting is rather limmited, so more information is better than less )
Also, both scripts would be using the curl command and shell script to download or save files, etc. What would happen, if both scripts tired to call the curl command at the same time? Would that cause a conflict, or would the scripts just be put in a queue?
Any ideas?but how do I know which document is which? Is there any way to tell safari to set the index of a document?
There are numerous ways of identifying/tracking objects within AppleScript - and that's generally true for any object in any app.
In this case 'index' is really front-to-back order, so 'document 1' (or 'window 1') is the frontmost, and therefore the inverse of how you created the documents in the first place. Of course that gets messy as you open new windows, move them around, etc.
You can change the index of the windows, though, which changes their relative order:
tell application "Safari"
set index of window 2 to 1
end tell
There are other ways, though. For example, each window has an associated ID, which is persistent, therefore you could store the ID of each newly-created window and use that as your target:
tell application "Safari"
make new document with properties {URL:"http://www.apple.com/"}
set appleID to id of window 1 -- store the window ID
-- later on you can reference that same ID:
delay 5
set s to source of document of window id appleID
end tell
Other options include the name of the document, as well as relative options. Each application and object class has its own terms, so you'll need to explore the dictionary to determine what's appropriate for any given task. -
Run powershell script against exchange using task schedule
I want to run this using task scheduler
Get-MailboxStatistics -Server mailserver | Select DisplayName, ItemCount, TotalItemSize | Sort-Object TotalItemSize -Descending | Export-CSV "\\pacetoputreport\report_$((Get-Date).ToString('MM-dd-yyyy')).csv"
I know I have to run some variation of this to launch the exchange module
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto"
How can I do this in Task Scheduler? I have tried numerous times using various combinations, but nothing seems to work.
Thank youYou need to put the first part where you call powershell.exe in the Program/script part of the task, but the rest of it is put into the arguments section. As explained here
http://www.msexchange.org/kbase/ExchangeServerTips/ExchangeServer2013/Powershell/scheduling-exchange-powershell-task.html (which has versions for both 2010 and 2013, but since you list V14 in your filepath I assume you're using 2010) you'd need to
set the arguments to :
-version 2.0 -NonInteractive -WindowStyle Hidden -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; <Your Command>" -
Running Shell scripts from the desktop
Hi,
I'm from the UNIX world rather than the mac one so have written a number of shell scripts. Lets call them foo.sh and bar.bash for the sake of argument.
These are sitting in a folder on my desktop
I can happily open a terminal session and run the scripts - and they work as I expect them to.
If I open a Finder window and double click on the icons for the scripts what happens is that it opens TextEdit.
Theres two things I'd like to change
A. I'd like to change the behaviour so that the scripts run when I double clike them rather than opening an editor (possibly in a terminal window )
B. I'd like to be able to change the editor from TextEdit to one I'm more used to...(I've installed Vim/Gvim which I quite like).
A. - Haven't managed to get anywhere trying to solve this....
B. - So far my attempts have got as far as...
1...
right-click -> open with -> Other -> select vim.app
tick Always open as
click open
The file then opens in a vim window.
however if I now close the vim application and double clike the file icon then the file opens in TextEdit again
2...
Right Click -> Get Info -> Open with VIM -> add -> Change all
message appears
'Are you sure you want to change all your Vimm.app documents to open with the application "vim.app"
This change will apply to all Vim.app documents with extension ".sh" '
click continue
In the Info pane the 'Open with' selection widget immediately changes to say 'Open with: TextEdit.app'
So I'm a bit stumped, can you help!
Regards
Mark
Mac Mini Mac OS X (10.4.3)Thanks to both people who answered.
You both gave me useful workarounds to my problem.
Renaming the scripts to be 'foo.command' was very hepful and useful to know. I tried this and it does indeed work. I may use this in the future.
I also had a play around with applescript and the automator to achieve similar results.
I agree that double clicking to run the file and also edit it is mutually exlcusive - I'm sort of trying to work out how I could make it do 'either/or' as I choose. In the Windows world i'd have the option of setting 'open' to run the script (assuming I'd got cygwin installed and had assiciated it) OR 'Edit with vim' if I wanted to edit the file (assuming vim was installed!).
Unresolved issue is that I'm still unable to get VIM to be associated with a .sh file.
The way I would envisage it working in Mac world would be to be able to right click on foo.sh -> Open with... and have a list to select from immediately there like..
Text Edit
Vim
Terminal (default)
and be able to somehow add and remove apps from the list and change which is the default.
My issue is that I don't seem to know how to get other apps than TextEdit to appear in the list - I suspect I need a better understanding of how these file/application associations work and are configured.
Regards
Mark -
[IDC S5] Run a script - get the extension Folder
Hi All
I'm novice in Extension Builder and may be my questions seems stupid...
I want to run a JSX for ID, located in a sub folder of my extension.
I use the "doscript()" method but I don't know how to refer to my ".jsx"
If I set a File variable what kind of path I have to specify? Absolute or not?
How can i get the folder of my extension?
File.applicationDirectory don't returns my extension folder.
Someone can help me?
thanks
IvanThere are two issues here.
Firstly, how to obtain the file path to your script, or any item under your extension folder.
File.applicationDirectory doesn't return your extension's directory, because extensions are loaded as sub-applications of a top-level "StageManager" application. And so File.applicationDirectory returns the StageManager directory rather than your extension's.
Instead you can use the following CSXSLibrary API to get the full path to an item in the extension directory:
var url:String = "app://" + CSXSInterface.getInstance().getSystemPath(SystemPath.APPLICATION).data + "myScript.jsx";
Secondly, there are some pitfalls to be aware of when using doScript from ActionScript. See Harbs's excellent cookbook entry http://cookbooks.adobe.com/post_Using_InDesign_doScript_UndoModes_in_ActionScript-18462.ht ml
David. -
Can "Planners" run calc script from the Planning web?
This is probably a really naive question.
However, can planners run a simple calc script(created in Essbase/AAS) from Workspace/Planning Web? If so what access would they be need to setup in Shared Service?
Or do we have to convert the calc script into a Business Rule and then grant access to the users?John,
Here are the roles that i assigned my user and he can view/launch the calc scripts from Planning Web without actually being an admin( i think)
Analytic Servers : server access
Business Rules: Administrator
Planning App : Interactive User
APS : Provisioning Manager
I would also like to conver the calc script to a BR as suggested, but not sure why i see no users available in the Business Rules-> administration tab.
As indicated above, the use has been provisioned as a BR admin!
Also, i tried refreshing the app with filters, refreshing the user list from BR->admin(right mouse), de-provision and re-provision the user! Any ideas?? -
Running shell scripts under the IDE
I have found where to set the path when running an executable:
Tools
Options
C/C++ Settings
has a Current Path (which doesn't have /usr/local/bin which I would like
it to have).
However, that path doesn't seem to govern running scripts which I do by
choose file in "Important Files" in Projects window
right-click to get menu
choose Run from this menu
nor can I find any way to do that. Unfortunately, I get too many hits
in Help search to track anything down in the online docs.Thanks to both people who answered.
You both gave me useful workarounds to my problem.
Renaming the scripts to be 'foo.command' was very hepful and useful to know. I tried this and it does indeed work. I may use this in the future.
I also had a play around with applescript and the automator to achieve similar results.
I agree that double clicking to run the file and also edit it is mutually exlcusive - I'm sort of trying to work out how I could make it do 'either/or' as I choose. In the Windows world i'd have the option of setting 'open' to run the script (assuming I'd got cygwin installed and had assiciated it) OR 'Edit with vim' if I wanted to edit the file (assuming vim was installed!).
Unresolved issue is that I'm still unable to get VIM to be associated with a .sh file.
The way I would envisage it working in Mac world would be to be able to right click on foo.sh -> Open with... and have a list to select from immediately there like..
Text Edit
Vim
Terminal (default)
and be able to somehow add and remove apps from the list and change which is the default.
My issue is that I don't seem to know how to get other apps than TextEdit to appear in the list - I suspect I need a better understanding of how these file/application associations work and are configured.
Regards
Mark -
Running "nightly scripts" and other behind the scenes tasks
I keep seeing posts about how the iMac Intel runs nightly scripts and/or other tasks behind the scenes. There is no mention of this in the user manual nor does Apple warn you about not putting the computer to sleep so that these tools will run. My iMac hard drive is asleep every night (as am I...) how can I get these things to run manually? How often? And can someone point me to literature to support this info?
Thanks much,
HS522/2968
Hi HS,
"There is no mention of this in the user manual"
That's because the three nightly maintenance scripts are not important at all, and don't affect Mac OS X performance.
They are only a relic from the glorious Unix system times when it was used on rather small capacities HDs, on computers that were running non stop for months or years...
Running them yourself manually, as a "perfectionist measure", can be done easily using the "daily, weekly & monthly" features in OnyX or Cocktail for example. All three tasks together, once a month or so, is fine. No harm (but useless) rerunning them many times.
Litterature:
The KB article is quite old, it shows only the default 10.2 times and commands:
- http://docs.info.apple.com/article.html?artnum=107388
(almost same as 10.3 and 10.4 though)
What I really would like to learn, is whether the scripts have been modified in the Intel version of Tiger.
Could you please (or Joseph or somebody else), in Finder, Go To (shiftcommandG) this folder:
/private/etc/
see if there is still the same
/private/etc/periodic
folder, with the three
/private/etc/periodic/daily
/private/etc/periodic/weekly
and
/private/etc/periodic/monthly
scripts?
(I'm asking because I don't own an Intel Mac myself).
Next you would Go To (⇧⌘G) this folder:
/System/Library/LaunchDaemons
please, see if you find those three files
/System/Library/LaunchDaemons/com.apple.periodic-daily.plist
/System/Library/LaunchDaemons/com.apple.periodic-weekly.plist
and
/System/Library/LaunchDaemons/com.apple.periodic-monthly.plist
If they are still there, you can open them (with TextEdit if your Developer Tools are not installed), and read the default times when the tasks are scheduled to run.
Thanks in advance!
Axl -
Running shell scripts from within oracle. A big task is forgotten
Dear List,
I have some shell shell scripts which do some tasks on the linux OS level.
I am calling the Korn scripts using a java class, which in turn is being called from a PLSQL function.
All but one of the 10 script works fine. This is the script which does the most work, and takes on average 40 minutes usually.
Why does Oracle forget the running of the shell script? I wait in my PLSQL function for the return code, but it never comes. The scripts I have not written myself !
I look forward to your reply on this matter.
regards
BenHi
If you are using the Oracle database 10g, the new dbms_scheduler package allows you to run shell scripts. The dbms_scheduler.create_job procedure have one parameter called the job_action in which you specify the full path of the shell script.
I hope this will help -
Creating scheduled task to run powershell script
Hi all,
been following this guide on how to create scheduled task to run a .ps1 script:
http://blogs.technet.com/b/heyscriptingguy/archive/2012/08/11/weekend-scripter-use-the-windows-task-scheduler-to-run-a-windows-powershell-script.aspx
When I manually run this task,in the history it says success, but it doesnt work.
The script should create a report and send me an e-mail.It works fine if i run it manually in Windows powershell or Powershell ISE.
I cannot see that a new report have been created either.
Anything im missing here?
Been using same account to run it manually and the one using in task scheduler.
thanks!
Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you. Thank you! Off2workHi all,
been following this guide on how to create scheduled task to run a .ps1 script:
http://blogs.technet.com/b/heyscriptingguy/archive/2012/08/11/weekend-scripter-use-the-windows-task-scheduler-to-run-a-windows-powershell-script.aspx
When I manually run this task,in the history it says success, but it doesnt work.
Try executing the same command in cmd line, do you get a different result? or does that work as well? -
How I run a shell script from the scheduler on 10.2.0.2.0 ?
Hello Oracle People,
I'd like to run a shell script from the Scheduler in my 10g database.
Right now it is a simple shell script.
Eventually it will wrap RMAN commands to back up my DB.
I wrote a simple pl/sql script to create a job:
-- cr_job10.sql
BEGIN
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'my_backup_job',
job_type => 'EXECUTABLE',
job_action => '/h/oracle/scripts/tst.sh',
start_date => '06-SEP-07 5.33.00PM US/Pacific',
repeat_interval => 'FREQ=DAILY',
end_date => '08-SEP-07 4.00.00PM US/Pacific',
enabled => TRUE,
comments => 'My Backup Job');
END;
I see no errors when I run the above procedure.
I checked DBA_SCHEDULER_JOBS and the job is in there.
The scheduler, though, errors out with an error which I see in a trace file:
/h/oracle/admin/orcl/bdump/orcl_j000_22396.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
ORACLE_HOME = /h/oracle/product/10r2
System name: SunOS
Node name: sol
Release: 5.10
Version: Generic_118855-14
Machine: i86pc
Instance name: orcl
Redo thread mounted by this instance: 1
Oracle process number: 15
Unix process pid: 22396, image: oracle@sol (J000)
*** ACTION NAME:(MY_BACKUP_JOB) 2007-09-06 17:33:00.175
*** MODULE NAME:(DBMS_SCHEDULER) 2007-09-06 17:33:00.175
*** SERVICE NAME:(SYS$USERS) 2007-09-06 17:33:00.175
*** CLIENT ID:() 2007-09-06 17:33:00.175
*** SESSION ID:(140.13520) 2007-09-06 17:33:00.175
*** 2007-09-06 17:33:00.175
ORA-12012: error on auto execute of job 53267
ORA-27369: job of type EXECUTABLE failed with exit code: 274662
I googled on this:
ORA-27369: job of type EXECUTABLE failed with exit code: 274662
Google returned only 1 hit.
There, I see some evidence that I need to configure something inside
of Oracle to run shell scripts from the scheduler, but possibly just
for machines running windows. I'm running Solaris.
Do any of you know what I need to configure inside of Oracle to
run shell scripts from the scheduler?
-OwenHello people,
I should have added this bit of information:
"The script runs fine from oracle's crontab."
"The script runs fine from a shell owned by oracle."
I'm getting responses telling me to check my env variables and permissions
which would be helpful to a UNIX novice.
I have a feeling that no one is using the scheduler to run RMAN scripts.
Tim Hall suggested I take a close look at these files:
$ORACLE_HOME/rdbms/admin/externaljob.ora
$ORACLE_HOME/bin/extJob
Currently I'm setup like this:
bash sol root /h/oracle/product/10r2/bin 31 #
bash sol root /h/oracle/product/10r2/bin 31 # ll $ORACLE_HOME/rdbms/admin/externaljob.ora
-rw-r--r-- 1 root dba 52 Sep 7 15:29 /h/oracle/product/10r2/rdbms/admin/externaljob.ora
bash sol root /h/oracle/product/10r2/bin 32 #
bash sol root /h/oracle/product/10r2/bin 32 # cat $ORACLE_HOME/rdbms/admin/externaljob.ora
# externaljob.ora
run_user = rman
run_group = rman
bash sol root /h/oracle/product/10r2/bin 33 #
bash sol root /h/oracle/product/10r2/bin 33 #
bash sol root /h/oracle/product/10r2/bin 33 #
bash sol root /h/oracle/product/10r2/bin 33 # ll $ORACLE_HOME/bin/ext*
-rwsr-x--- 1 rman dba 30388 Sep 21 2006 /h/oracle/product/10r2/bin/extjob*
-rwsr-x--- 1 rman dba 30392 Sep 21 2006 /h/oracle/product/10r2/bin/extjobo*
-rwsr-x--- 1 rman dba 34468 Sep 21 2006 /h/oracle/product/10r2/bin/extproc*
-rwxr-xr-x 1 oracle dba 300 Sep 21 2006 /h/oracle/product/10r2/bin/extusrupgrade*
bash sol root /h/oracle/product/10r2/bin 34 #
bash sol root /h/oracle/product/10r2/bin 34 #
bash sol root /h/oracle/product/10r2/bin 34 #
On my system, the user 'nobody' has no shell so I cannot use nobody.
I created a user named rman:
bash sol root /h/oracle/product/10r2/bin 34 #
bash sol root /h/oracle/product/10r2/bin 34 #
bash sol root /h/oracle/product/10r2/bin 34 # su - rman
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
$
$ id
uid=220(rman) gid=220(rman)
$
$
$ date
Fri Sep 7 16:30:03 PDT 2007
$
$
Jared points out that rman needs access to extproc:
$ ls -la /h/oracle/product/10r2/bin/extproc
-rwsr-x--- 1 rman dba 34468 Sep 21 2006 /h/oracle/product/10r2/bin/extproc
$
$
Here is a demo of rman running his script:
bash sol root /h/oracle/product/10r2/bin 35 # su - rman
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
$
$
$ ls
scripts
$
$
$ scripts/tst.sh
$
$
$ cat scripts/tst.sh
#! /bin/sh
/usr/bin/date > /tmp/tst.sh.out.txt 2>&1 &
exit 0
$
$
$ cat /tmp/tst.sh.out.txt
Fri Sep 7 16:31:23 PDT 2007
$
$ rm /tmp/tst.sh.out.txt
$
I am focused on this error:
ORA-27369: job of type EXECUTABLE failed with exit code: 274662
And I am focused on this exit code: 274662
What does 274662 mean?
If the Scheduler gives me an error like "274662" rather than some English,
it's obvious to me the Scheduler is a POS and I should not use it.
And of course,
If I cannot run RMAN from Oracle Scheduler, I'll use cron.
-Owen
Maybe you are looking for
-
WiFi Grayed, Bluetooth looping
I have my iPhone WiFi grayed almot all the time, and Bluetooth looping for a long times, sometimes it take a day to go back to off or on state. I thought that the problem began with updating to iOS 7.0.6, but I wasn't using WiFi & Bluetooth before t
-
I have used ITunes for years to manage my music. I think it is a great system, and Apple has even been able to add features I wanted after listening to user feed back. In hopes Apple may listen to this short post, I would like a change in the funct
-
Intersecting Layers with alpha problem
Hi, I have a problem with Motion when two layers intersect. On layer is totally opaque, and the second layer has transparent areas. The problem occurs in areas when the transparent areas intersect with opaque areas. In those regions I get a dark gray
-
RE: (forte-users) XML Parser - Reading an XML document intothe Document
Hi Laks Here is an example of converting a XML doc to a DOM object. The method is ParseXML(pXMLString:TextData, pListType:CSAListInterface). Hope this helps. Argyris Simakis Corporate Services Applications ITB Sydney AUSTRALIA -----Original Message--
-
IDOC to update business partner data in FSRI(part of CRM system) .
Hi , I want to know an INBOUND IDOCs to update business partner data in FSRI (part of CRM system) . Please help . Regards Chetan Moderator message: please do your own research before asking. Edited by: Thomas Zloch on Dec 21, 2010 5:14 PM Moderator m