Run MS Access mdb with task scheduler - ms-access

I want to simply open an MS Access MDB file with task scheduler, but it just says "running" and leaves MS Access open in the background which I can only see in the task manager.
I have an AutoExec macro that does it's thing and then closes itself. Works fine opening the program manually, doesn't do anything when opened from task scheduler (Including clicking run on the task myself).
I've seen many ask this online, but have found no solutions.
Here's what I have in the Task Scheduler:
Program/Script: "C:\Program Files (x86)\Microsoft Office\Office14\MSACCESS.EXE"
Add arguments (optional): C:\[TheDirectory]\SCServerData.mdb
I have other Task Scheduled .bat files that run with no problem.

Turns out it's quite simple actually. I just put the command in a batch file instead and run that with Task Scheduler. Seems to be working so far.

Related

SSIS oncancell / force stop event handler

I have SSIS package, where I'd like to do following:
in case, that I run it from Visual Studio and press STOP button, want to write information into my log table, that process was killed
same, but for situation, then .dtsx runs via dtexec, which runs via Windows scheduler - in case that runs longer than configured, Win Scheduler automatically kills to job
Don't you know if that's somehow possible?
Thanks

UIPath Orchestrator based Automation: Schedule Job Fails due to robot unavailability

I have my GCP machine that is scheduled to switch on and run from 6hrs in the morning to 12hrs. I am trying to automate the script once the machine is on, so I am scheduling a job on 6:30 hrs.
But what I observed is that UIPath Robot doesn't automatically get connected unless I open an RDP session and then manually open UI Path Assistant to connect it with orchestrator.
I also tried to create a bat script and schedule it with windows startup. But that fails to run as well. To verify my startup script I added two commands:
<verification script sending mail on startup> && <UIPath Script>
I tested this script manually in RDP session and they did run sequentially as expected. But when I added it to auto-scheduling in gcp, only the first script actually ran (<verification script sending mail on startup>) and the second one (<UIPath Script>) just didn't.
Moreover I did put the bat file in Windows Startup Folder but again that also required me to sign into the system using RDP session for it to run.
From my understanding, the UIPath Script (XAML) in order to run needs the system to be switched on 24/7 and then it connects to orchestrator and then we can schedule the process based on the time, but then my maching will be idle for lots of ineffective hours.
Secondly, going by the .bat file to be as a startup script also fails as in order to run the script, it needs the user to be logged in which doesn't happen. Though other scripts such as .py files run smoothly so I lose here as well.
Finally scheduling my bat file through windows startup feature does work but then it's also of no use as for it to start also I need to open an RDP session and log in.
Does anyone know the workaround for this?

SSIS Execute Process task does not write files

I have a custom EXE written in C# (I didn't write it). It retrieves data from MongoDB and writes six CSV files to the same folder that it resides in.
I can double-click on the EXE and run it -- I do need to run it as an administrator. I have its administrator privileges set in the properties, so it always runs as administrator. It pops up a window with some status messages, then closes without prompting after creating the files.
I have the same EXE listed in an "Execute Process" task in SSIS (VS 2015, pointed to SQL Server 2012). When I run it, it pops up the same cmd window, gives the same status messages, closes without prompting, and continues to the next step in my SSIS package... BUT it doesn't write any files.
I gave "Everyone" permissions to the target folder, which doesn't seem to have helped. What do I need to do?
When the process is launched from SSIS, it's not being run from the same folder as the executable. That's pretty typically of any software executing an external process.
Fortunately, you can set the "working folder" option within the Execute Process task properties. If your executable is written to write to the current folder, it should work.

Cannot Open DataFile SSIS Package via SSMS

Background
Created package in BIDS.
Deployed to SSMS
Package writes files to a CSV file in a network fileserver.
The default name of the package's flat file destination is $path\workcsvout.csv
Package derives filename from an expression
Issue
When I configure and run from SSMS, it fails with Error DFT -Extract to File:Error:Cannot open the datafile "........\DerivedFilename.
Troubleshooting
Verified the file exists in directory - used flat file destination temp filename, before derived filename - still failed
changed name to file it was trying to open - still failed
I am running job from my login in SSMS, via SSISDB - Projects - Package - .dtsx package - Execute
See pictures below and advise if more information is needed.
Thanks
Ensure Visual Studio isn't open after attempting to either run the package directly from the Integration Services Catalog as I have found that VS can hang onto a connection to the files you are writing to and it can throw similar errors.
Ensure the account configured for the package has sufficient permissions in all the areas it needs to write to.
After VS is closed and permissions are all set in step 2, try executing the package directly inside the Integration Services Catalog in SSMS. If this works, move to step 4. If this doesn't work, troubleshoot the errors and ensure security is all setup properly and you are executing the package with the same account.
If you are here, I will assume you want to schedule the package. Ensure that the owner is the same account used in step 2. Check the "Run As" account in Step in the job, if that account is not the same as step 2 then you either need to make it the same or give that account the same access as the account used in step 2.
I went through this troubleshooting process and it solved my issue. I also was building files on a general UNC file path like \servername\folder\folder without needing to do any local business with \servername\d$\folder\folder that other people recommend.
I would check to make sure that your SQL Server service account has full rights to the landing folder.
After experiencing the same issue as you, I finally checked the folder permissions that were created for our SQL Server service account. Come to find out that it was missing the "Full Control" and "Modify" folder permissions. Once I granted these to our service account, the issue went away.
Folder Permissions Dialog Box
Troubleshooting:
Can you try to create file on local and then move the file using File System Task.
I was trying to pump the data which is in csv file.
Closing the visual studio and closing the csv file which was opened in another machine resolved the problem

SSIS FTP Task - File size changes

I would like to transfer a .txt file from a local machine (Windows 7 64-bit) to a Linux server.
The connection uses a passive mode and the task is set up with istransferascii = false
No matter, if I use variables or not for path destination, I face the same issue.
The task runs correctly and I receive the file into the remotepath but when I open the file, it is incomplete.
How to solve this problem and check if the file is complete?
I think the native SSIS FTP Task is not very useful.
I've used WinSCP successfully at a few sites. It seems quite reliable and has more functionality (e.g. SFTP, resuming) and much better doco and support. You can integrate it into SSIS using the Execute Process Task.
My favourite feature is that you can string a series of commands onto the command line - no need to mess with script files.