To run my functional script in schedule times
Hi
This is ravi.
I prepared one functional script using OATS. Then i want to run that script after some time.I want to put some schedule time to run that script .I have searched in the tool but i am unable to find the solution...can any please help me regarding this issue??
Thanks in advance
Edited by: 838740 on Feb 22, 2011 4:15 AM
Hi we have created OATS ADF loadtesting script.. would like to know how we can run Loadtest in command line mode or schedule multiple LOAD test
c:\oracleats\openscript\runscript.bat
-- this will run only Open Script - single user
OTM
-- is letting me only to schedule functional tests not load tests
please let us know if there is any way to schedule load test which will hel in automating our entire test env.
Thanks
Joseph
Similar Messages
-
Unable to run OpenScript Functional Scripts from OTM
Hi,
I am unable to run OpenScript Functional Scripts from OTM, but the same script is running successfully on OpenScript.
I have a script which has all my functions (say Script A) and I am calling these functions from a different script (Script B) and even this script (Script B) uses couple of Databanks.
Added both the scripts to OTM and when I run the script (Script B) which is calling the functions on OTM, I see the below error message.
Error Message: Child script with alias "Proceure_ To_Pay_Functions" not found. Add to the script "Proceure_To_Pay" a script asset with alias "Proceure_ To_Pay_Functions"
But the child script (Script A) with functions is added as a script asset in OpenScript to the calling script (Script B) and this script is running fine from OpenScript.
Can anyone please help me in resolving this issue.
Thanks,
SatyaHi Deepu,
It worked and able to run the scripts developed in OpenScript from OTM. Thanks for your help!!
But I see another problem where when I try to run the script from OTM, I see a window Interactive Services Detection with a Message
"A program running on this computer is trying to display a message" "The Program might need information from you or your permission to complete a task." with Two Options
-> View The Message
-> Ask me Later
When I click on View the Message, I can see my application running by script but my desktop is not visible.
There is another window with Return to Desktop option, when I click on this I can see my Desktop.
Can I not see both my Desktop and application running on the same screen?
Please help!!
Thanks,
Satya -
Running an automated script at scheduled intervals
Greetings all,
Is there a way to setup a process or job to run an SQL Script automatically on the first of the month? I am running on a server much like apex.oracle.com so I don't have permissions to the back end of the database and can't run a cron job.
What I am trying to do is run a script that updates a table on the 1st and 15th of the month.
I Googled it and searched OTN and was not able to find what I was looking for so asking the experts.
Thanks in advance for any assistance.
Wallywfsteadman wrote:
I definitely did not good for dbms_scheduler or dbms_job.. so that may be my first issue. will this run from application express? I don't have access to the backend of the database or to a command line so I would have to set it up in the application and not sure how to do that.APEX provides SQL Workshop with the SQL Commands and SQL Scripts processors.
I've just successfully tested basic <tt>dbms_scheduler</tt> functions on apex.oracle.com, so try it on your environment.
<li>Go to SQL Workshop > SQL Commands
<li>Create a basic, run-once job (that actually does nothing):
begin
dbms_scheduler.create_job(
job_name => 'myjob',
job_type => 'plsql_block',
job_action => 'null;',
enabled => true);
end;If this returns
Statement processed.rather than an error message then you're probably good to go.
<li>Check the execution log:
select * from user_scheduler_job_run_details;Should return something like:
5825946 19-JUL-11 02.53.12.839925 PM -05:00 NANDBTAG MYJOB - SUCCEEDED 0 19-JUL-11 02.53.12.808693 PM AMERICA/CHICAGO 19-JUL-11 02.53.12.817457 PM AMERICA/CHICAGO +000 00:00:00 1 1171,2895 25087 +000 00:00:00.02 - - - - -<li>Try creating a job that runs every minute:
begin
dbms_scheduler.create_job(
job_name => 'myjob',
job_type => 'plsql_block',
job_action => 'null;',
start_date => '19-JUL-11 03.10.00 PM', /* Remember to use the DB time, not your local time if not specifying a timezone */
repeat_interval => 'freq=minutely',
enabled => true);
end;<li>Check it's status in the <tt>user_scheduler_jobs</tt> view:
select * from user_scheduler_jobs;
MYJOB - REGULAR APEX_PUBLIC_USER MACMILP:1275550617277611 - - - PLSQL_BLOCK null; 0 - - CALENDAR 19-JUL-11 03.10.00.000000 PM -05:00 freq=minutely - - - - - - - - DEFAULT_JOB_CLASS TRUE TRUE FALSE SCHEDULED 3 0 - 0 - 0 - - 19-JUL-11 03.10.00.000000 PM -05:00 - - OFF FALSE TRUE - FALSE 1 NLS_LANGUAGE='AMERICAN' NLS_TERRITORY='AMERICA' NLS_CURRENCY='$' NLS_ISO_CURRENCY='AMERICA' NLS_NUMERIC_CHARACTERS='.,' NLS_CALENDAR='GREGORIAN' NLS_DATE_FORMAT='mm/dd/yyyy' NLS_DATE_LANGUAGE='AMERICAN' NLS_SORT='BINARY' NLS_TIME_FORMAT='HH.MI.SSXFF AM' NLS_TIMESTAMP_FORMAT='DD-MON-RR HH.MI.SSXFF AM' NLS_TIME_TZ_FORMAT='HH.MI.SSXFF AM TZR' NLS_TIMESTAMP_TZ_FORMAT='DD-MON-RR HH.MI.SSXFF AM TZR' NLS_DUAL_CURRENCY='$' NLS_COMP='BINARY' NLS_LENGTH_SEMANTICS='BYTE' NLS_NCHAR_CONV_EXCP='FALSE' - 1 - - - - - FALSE FALSE - 133168<li>And that it's executing every minute:
select * from user_scheduler_job_log;
5826446 19-JUL-11 03.13.00.264038 PM -05:00 NANDBTAG MYJOB - DEFAULT_JOB_CLASS RUN SUCCEEDED - - - - - - - -
5826426 19-JUL-11 03.12.00.191519 PM -05:00 NANDBTAG MYJOB - DEFAULT_JOB_CLASS RUN SUCCEEDED - - - - - - - -
5826386 19-JUL-11 03.11.00.075835 PM -05:00 NANDBTAG MYJOB - DEFAULT_JOB_CLASS RUN SUCCEEDED - - - - - - - -
5826366 19-JUL-11 03.10.00.048849 PM -05:00 NANDBTAG MYJOB - DEFAULT_JOB_CLASS RUN SUCCEEDED - - - - - - - -After that you want to experiment with the calendar syntax to figure out how to run a job on the first of the month, and plug in your own PL/SQL block or stored procedure <tt>job_action</tt> that actually does something.
And if that first call errors out and you don't get anywhere near this far, you'll have to contact the host DBAs an enquire about getting CREATE JOB privilege granted to the required parsing schema in your workspace.
(If it does work, remember to drop any experimental jobs when you're done to free up resources for everyone else!) -
I've been using Steve Lambert's SelfControl to block myself from certain time-sucking internet sites for a certain period of time every day. I've automated the program launch using an AppleScript that runs based on an iCal alarm, but the problem is that if my computer has been asleep or shut off, the script will run as soon as I wake it up or start it up, and that can be very inconvenient if I'm intending to use my computer not during the hours when I intended to restrict access to such websites.
So, is there any way to schedule an AppleScript to run *only* if the computer is running at the designated time and not upon waking/starting up after the alarm has passed if the computer was asleep/off?
I started investigating launchd, as I understand this is the successor to cron/crontab in OS X Lion, but it appears that launchd has the same behavior I dislike in the iCal alarm approach--the script will run upon waking even if the time when it was supposed to run has already passed...unless there is a way to change this behavior?The obvious/easy solution would be to add some logic to the script to see what the time is.
If you expect the script to run at, say, 1pm, but the script checks the time and sees that it's 5pm then you can assume the machine was asleep at the time and thefore you can bail out gracefully.
if (hours of (get current date)) = 13 then
-- it's sometime in the 1pm hour...
end if
You can fine-tune the check as much as you like -
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 -
How can I run a counter by number of times the script is run
So I've created a script for disabling exchange mailboxes and moving them to a disabled OU in AD. I currently have this set to run once a week via scheduled tasks but instead would like to kick it up to nightly and improve on the logging.
Right now, the only items I record are the name of the person and the OU they were originally in. I'd also like to include the groups they were a member of. I could easily enough include all the groups they were a member of in the email but here
is the twist.
Since we are going to a nightly run of this script, we would want to keep at least a weeks worth of logs in a text file as a just in case. After a week, the log would be cleared. I know that would be a counter but I can't even wrap my mind around
how that would work. Is it even possible?
#Finds all users who have the AD attributes
# wWWHomePage = Updated_by_GroupID
# msExchHideFromAddressLists = True
# msExchHomeServerName not empty
# emailaddress contains @MyDomain.com
# useraccountcontrol = 514 (disabled)
Import-Module ActiveDirectory
add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010
#Declare Variables
$users = $null
$ADgroups = $null
$username = $null
$user = $null
$LogFile = "C:\Scripts\TerminateUsersLogFile.txt"
$LogFile2 = "C:\Scripts\UserNamesMovedtoDisabledOU.txt"
$EmailLogTo = "[email protected]"
#Generates log file
Start-Transcript -path $LogFile
#Performs search for all users in AD filtering only AD user with wWWWHomePage = Updated_by_GroupID, msExchHideFromAddressLists = True, msExchHomeServerName not empty and emailaddress contains @MyDomain.com
$users = Get-ADUser -properties name, emailaddress -Filter {(HomePage -eq "Updated_by_GroupID") -and (msExchHideFromAddressLists -eq $true) -and (emailaddress -like "*@MyDomain.com") -and (msExchHomeServerName -ne "$null") -and (useraccountcontrol -eq "514")}
$users.name -Replace '^cn=([^,]+).+$','$1'
#loops through all users
foreach ($user in $users){
$user.name -Replace '^cn=([^,]+).+$','$1'
#Copies the current OU into the Notes field in the AD User Object.
$newvar = ($user).distinguishedname
set-aduser $user -replace @{info="$newvar"}
# Removes user from all AD groups except Domain Users.
$ADgroups = Get-ADPrincipalGroupMembership -Identity $user | where {$_.Name -ne "Domain Users"}
Remove-ADPrincipalGroupMembership -Identity "$($user)" -MemberOf $ADgroups -Confirm:$false
#Disables their Exchange Mailbox.
Disable-Mailbox -Identity $user.EmailAddress -Confirm:$False
#Moves their AD user object to disabled OU.
Move-ADObject -Identity "$($user.DistinguishedName)" -TargetPath "Disabled Users OU" -Confirm:$false
Write-Output $user.name >> C:\Scripts\UserNamesMovedtoDisabledOU.txt
Stop-Transcript
# Email the log file
$emailFrom = "[email protected]"
$emailTo = $EmailLogTo
$subject = "Terminated Users Cleaned in AD"
$content = Get-Content $LogFile2 | ForEach-Object {$_.Split("`r`n")}
$body = [string]::Join("`r`n",$content)
$smtpServer = "SMTP.MyDomain.com"
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$smtp.Send($emailFrom, $emailTo, $subject, $body)
clear-content C:\Scripts\UserNamesMovedtoDisabledOU.txtI apologize for the long delay in replying. I thank everyone for their help but I'm still running into issues with the script. Below is the script as it is right now. I'm having issues with logging as the groups the associate is a member
of are not logging correctly.
#Finds all users who have the AD attributes
# wWWHomePage = Updated_by_GroupID
# msExchHideFromAddressLists = True
# msExchHomeServerName not empty
# emailaddress contains @MyDomain.com
# useraccountcontrol = 514 (disabled)
Import-Module ActiveDirectory
add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010
#Declare Variables
$users = $null
$ADgroups = $null
$username = $null
$user = $null
$LogFile = "C:\Scripts\CleanUpTermedUsers\TerminateUsersLogFile.log"
$LogFile2 = "C:\Scripts\CleanUpTermedUsers\UserNamesMovedtoDisabledOU.txt"
$EmailLogTo = "[email protected]"
#Generates log file
Start-Transcript -path $LogFile
#Performs search for all users in AD filtering only AD user with wWWWHomePage = Updated_by_GroupID, msExchHideFromAddressLists = True, msExchHomeServerName not empty and emailaddress contains @mydomain.com
$users = Get-ADUser -properties name, emailaddress -Filter {(HomePage -eq "Updated_by_GroupID") -and (msExchHideFromAddressLists -eq $true) -and (emailaddress -like "*@mydomain.com") -and (msExchHomeServerName -ne "$null") -and (useraccountcontrol -eq "514")}
$users.name -Replace '^cn=([^,]+).+$','$1'
#loops through all users
foreach ($user in $users){
$user.name -Replace '^cn=([^,]+).+$','$1'
#Copies the current OU into the Notes field in the AD User Object.
$UserOU = ($user).distinguishedname
set-aduser $user -replace @{info="$UserOU"}
# Removes user from all AD groups except Domain Users.
$ADgroups = Get-ADPrincipalGroupMembership -Identity $user | where {$_.Name -ne "Domain Users"}
Write-Output $user.name >> C:\Scripts\CleanUpTermedUsers\UserNamesMovedtoDisabledOU.txt
write-output $ADgroups.name >> C:\Scripts\CleanUpTermedUsers\UserNamesMovedtoDisabledOU.txt
echo $ADgroups.name
Remove-ADPrincipalGroupMembership -Identity "$($user)" -MemberOf $ADgroups -Confirm:$false
#Disables their Exchange Mailbox.
Disable-Mailbox -Identity $user.EmailAddress -Confirm:$False
#Moves their AD user object to disabled OU.
Move-ADObject -Identity "$($user.DistinguishedName)" -TargetPath "Disabled OU" -Confirm:$false
Stop-Transcript
# Email the log file
$emailFrom = "[email protected]"
$emailTo = $EmailLogTo
$subject = "Terminated Users Cleaned in AD"
$content = Get-Content $LogFile2 | ForEach-Object {$_.Split("`r`n")}
$body = [string]::Join("`r`n",$content)
$smtpServer = "smtp.mydomain.com"
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$smtp.Send($emailFrom, $emailTo, $subject, $body)
Get-ChildItem -Path C:\Scripts\CleanUpTermedUsers\* -Include *.log | where-object { $_.LastWriteTime -lt $((Get-date).Adddays(-7))} | clear-content C:\Scripts\CleanUpTermedUsers\TerminateUsersLogFile.log
Clear-Content c:\Scripts\CleanUpTermedUsers\UserNamesMovedtoDisabledOU.txt -
How to run ABAP Function Module in Background Wchich Takes Long Time to Run
How to run ABAP Function Module in Background FOR LONG TIME
I am not that experienced with ABAP. I am on SAP BI 7.0. I WANT TO RUN A FUNCTION MODULE
RSDRT_INFOCUBE_DATA_COPY.
I used SE37 and then executed the module, I supplied the parameters on the form which opped-up and then program started running. . Program was however interrupted after 10 minutes by ABAP. How can I run it in background without interruption?
THANKS A LOT.Hi,
You can call this FM in a program and run that program in background.
Regards,
Raju -
What is the best way to run a powershell script with parameters in the Task Scheduler?
Hello,
Want to run the following from a scheduled task in the Task Scheduler on a server. What is the best approach?
.\pscript.ps1 -csvfile "\\Srv1\Share\File.txt"
Thanks for your help! SdeDotHi,
To run a powershell script with parameters in the Task Scheduler:
Program: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Add argument (optional): -Command "& c:\scripts\test.ps1 -par1 2 -par2 3"
Hope the below two articles be helpful for you:
Schedule PowerShell Scripts that Require Input Values
https://blogs.technet.com/b/heyscriptingguy/archive/2011/01/12/schedule-powershell-scripts-that-require-input-values.aspx
How to Schedule a PowerShell Script
http://dmitrysotnikov.wordpress.com/2011/02/03/how-to-schedule-a-powershell-script/
Regards,
Yan Li
Regards, Yan Li -
How to run ABAP Function Module in Background FOR LONG TIME?
I am not that experienced with ABAP. I am on SAP BI 7.0. I WANT TO RUN A FUNCTION MODULE
RSDRT_INFOCUBE_DATA_COPY.
I used SE37 and then executed the module, I supplied the parameters on the form which opped-up and then program started running. . Program was however interrupted after 10 minutes by ABAP. How can I run it in background without interruption?
THANKS A LOT.Change parameter rdisp/max_wprun_time.
Default value for this is 600 seconds (10minutes).Change it to a time which you think you need for copying infocube data.
May be 5 hours.
PS:You can not run Function Module in background directly,but you can create a Z* program and call that FM from within that program and then run the program in background.
Hope this answers your query. Best of Luck!
Thanks and Regards
Anindya
Edited by: Anindya Bose on Jun 30, 2009 1:24 PM -
Jobs running different than scheduled time
Hi All'
I have 10g(10.2.0.2) database in linux,It is in Austin.
Recently the jobs scheduled are running on different than scheduled time.
And time in EM and the date command in linux also showing different.
$ date
Wed Oct 31 03:59:01 CDT 2007
and the same time EM showing 2:59:42 AM
And some of the jobs are failing also.
I checked the following
SQL> select sessiontimezone from dual;
SESSIONTIMEZONE
-05:00
SQL> select dbtimezone from dual;
DBTIME
+00:00
can anybody please give the solution
Thanks in advance,
safThere are a number of threads in this forum which deal with this type of issue:
Re: changing SO hour - problem to run a scheduled job
did it start on Oct 28th ? It may be a DST issue. Lookup in metalink 402742.1. -
Run Powershell script from Scheduled Task as "NT Authority \ SYSTEM"
Hello, dear Colleagues.
Cannot make Powershell script from Scheduled Task as "NT Authority \ System"
Action: Start a program -
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "C:\script.ps1"
The matter is that script is working, moreover if to run Task with Domain Account it works too.
Checked Run with highest privileges, changed "Configure for" field, tried different arguments (-noprofile, -noexit, -executionpolicy bypass, -command, -file,") - no luck.
Didn't you try to make it work with SYSTEM account?
Thanks.Hi fapq,
Try this link task schedulers
Note
To identify tasks that run with system permissions, use a verbose query (/query/v). In a verbose query display of a system-run task, the Run As User field has a value of NT AUTHORITY\SYSTEM and
the Logon Mode field has a value of Background only.
Naveen Basati -
Running a SFTP script as a scheduled task
Would like to run a SFTP script I wrote which is shown below as a scheduled task. It runs fine when I don't use the task scheduler. Technically it runs when I do use the task scheduler I just don't wind up with any .csv files. It is
currently written in vbscript and i'm not sure if it's worth it to convert it to powershell. Do you have advice on what I can do differently to make it work as a scheduled task? To attempt to resolve the problem I tried to run it
from a BATCH file which did not help.
set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.run("C:\xyz\PSFTP.EXE")
WshShell.AppActivate "C:\xyz\PSFTP.EXE"
WScript.Sleep 1000
WshShell.SendKeys"open secureftp.server.com"
WshShell.SendKeys("{Enter}")
WScript.Sleep 1000
WshShell.SendKeys"Username"
WshShell.SendKeys("{Enter}")
WScript.Sleep 1000
WshShell.SendKeys"Password"
WshShell.SendKeys("{Enter}")
WScript.Sleep 1000
WshShell.SendKeys"cd Folder1"
WshShell.SendKeys("{Enter}")
WScript.Sleep 1000
WshShell.SendKeys"mget *.*"
WshShell.SendKeys("{Enter}")
WScript.Sleep 4000
WshShell.SendKeys("bye")
WshShell.SendKeys("{Enter}")
The file shown below is how I wrote the batch file. The first line clears out all previous .csv files and I delay a second and kick off the vbscript.
Del /Q "C:\xyz\*.csv"
ping 192.0.2.2 -n 1 -w 1000 > nul
wscript "C:\xyz\ftp.vbs"Thanks Bill I appreciate that.
The first thing I needed to do was add the start in path to the scheduled task
Then the script needed converted to powershell since sendkeys is no longer supported. I found a good example on the net and used it.
$username = "Username"
$password = "Password"
$server = "secureftp.server.com"
$exepath="C:\xyz\PSFTP.EXE"
$cmd = @(
"cd ..",
"cd folder1",
"mget *.*",
"bye")
$cmd | & $exepath -pw $password "$username@$server" -
How to run a function from a scripted MC
I haven't used AS1 in a while and I do not know why my code isn't working and I don't knnow how to fix it, I have been playing around with it and trying to figure out how to get to a function or run a function which is on the main timline from an mc or even just skip to that code (since its the last frame of my MC) the MC includes nothing but actionscript to gather information to save/create a .txt file.
Basically how can I run a function on the main timeline from where I am now?
if (_root.ssFileSave != "?") {
_root.filename = _root.ssFileSave;
_root.onsaver();
onsaver is the function I am trying to run and I have tried all sorts to get it working properly :S
win 7 cs5 as1 (+using SWF studio which I am using to create and save file(s))if onsaver is defined on the _root timeline AND it has been defined when that code executes (use trace functions to confirm), then
_root.onsaver(); // is correct coding -
I have a script that runs well the vast majority of the time. On occasion I get an exception. I would appreciate any insight as to why it fails on occasion. I can't understand why the new-object cmdlet wouldn't be recognized:
Message: The term 'new-object' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Source: System.Management.Automation
StackTrace: at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandTypes commandTypes, SearchResolutionOptions searchResolutionOptions, CommandOrigin commandOrigin, ExecutionContext context)
at System.Management.Automation.CommandDiscovery.LookupCommandProcessor(String commandName, CommandOrigin commandOrigin, Nullable`1 useLocalScope)
at System.Management.Automation.ExecutionContext.CreateCommand(String command, Boolean dotSource)
at System.Management.Automation.PipelineOps.AddCommand(PipelineProcessor pipe, CommandParameterInternal[] commandElements, CommandBaseAst commandBaseAst, CommandRedirection[] redirections, ExecutionContext context)
at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Here is the script I am running:
param([string]$endpoint)
$ErrorActionPreference = "Stop";
try
[System.Reflection.Assembly]::LoadFile("D:\dotNET_Apps\dotNETCOExBatch\DotNETCOExBatch\bin\DotNETCOExBatch.dll")
$schedule = new-object DotNETCOExBatch.CallService
$reply = $schedule.CallWebService($endpoint)
if ($reply)
$host.setshouldexit(0)
else
$host.setshouldexit(8)
Catch
$nl = [Environment]::NewLine
$evt=new-object System.Diagnostics.EventLog("Application")
$evt.Source="BatchPowerShell"
$infoevent=[System.Diagnostics.EventLogEntryType]::Error
$batchException = $_.Exception
$logMessage = " "
while ($batchException)
$exMessage = $batchException.Message
$exStackTrace = $batchException.StackTrace
$exSource = $batchException.Source
$logMessage += "$nl $nl Message: $exMessage $nl $nl Source: $exSource $nl $nl StackTrace: $exStackTrace"
$batchException = $batchException.InnerException
$evt.WriteEntry(" Error starting or process cancellation of $endpoint $logMessage",$infoevent)
$host.setshouldexit(15)Hi,
Please close your current powershell console, and start a new Window, and then check the result.
Like David replied, this is a strange issue, hard to find the cuase, but I will report the issue, hope
someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
Regards,
Yan Li
TechNet Subscriber Support
If you are
TechNet Subscription
user and have any feedback on our support quality, please send your feedback
here.
Cataleya Li
TechNet Community Support -
How to check why some of the Cron jobs didn't ran at the scheduled time?
This is my first question ever on the forum. Hope I'm following the format of posting the thread.
I could find a similar query on the forum but couldn't find the exact answer.
Versions:
Oracle: 11.2.02.0
Linux: Linux xxxxx 2.6.32.12-0.7-default #! SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/LINUX
In our crontab there are lot of scripts that ran at the scheduled time. Around 3 reports didn't ran at the scheduled time today?
There is no error or some error mail saying that those reports got failed. They just didn't ran at that time.
How to find out why those jobs didn't ran?
Is there anything like cron log or something like that to trace it?
Please guide me. Thanks in advance.977789 wrote:
This is my first question ever on the forum. Hope I'm following the format of posting the thread.
I could find a similar query on the forum but couldn't find the exact answer.
Versions:
Oracle: 11.2.02.0
Linux: Linux xxxxx 2.6.32.12-0.7-default #! SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/LINUX
In our crontab there are lot of scripts that ran at the scheduled time. Around 3 reports didn't ran at the scheduled time today?
There is no error or some error mail saying that those reports got failed. They just didn't ran at that time.
How to find out why those jobs didn't ran?
Is there anything like cron log or something like that to trace it?
Please guide me. Thanks in advance.Since this question has nothing to do with Oracle Databases and everything to do with Linux functions and usage, it would be better asked in the [url https://forums.oracle.com/forums/forum.jspa?forumID=135]Linux Forum
When posting there, you can save yourself a bit of time by going ahead and showing the line from crontab for a report that "didn't run", and perchance the script itself. Best enclosed in the / tags to preserve formatting.
Maybe you are looking for
-
Rounding quantity field in scheduling agreement not considered in JITK
Hello ALL, I would like to consult to you a scenario I am facing when it comes to creating a scheduling agreement (VA31) and maintaining a Rounding Quantity (field ABLFZ) in it. When using the standard LZ type scheduling agremeent, the Rounding quant
-
Good photo gallery to use with Paypal?
I built my site using Dreamweaver 8. I now want to redo it using more CSS and another photo gallery. I believe someone mentioned something on this forum called LightBox or had that word associated with it. Can anyone recommend a gallery that would be
-
Digital Cinema Desktop with iMac?
Can the Digital Cinema Desktop feature in Final Cut be used with the iMac G5? (I have the May 2005 rev)
-
The "dropdown for "Save passwords is NOT grayed out. Clicking the "save password box does NOTHING. I am running Windows XP SP3. The previous version (21) worked fine. Version 223 does not allow for passwords to be saved. I am NOT in the Private viewi
-
my adobe pdf files are not working on the safari, they don't open and something pops up that says i need to accept the user agreement but i've done it so many times. how do i fix this? please help!