I have tried to change the IP of a server via script and schedule it automatically but it was not giving proper results.So i relied on a tacky method of doing it using "Automator"app in Mac.
I created a workflow using this Automator ,Now i need to schedule this to work every 10 minutes or so.How can i do that in Mac with any scripts or anything. Suggestions will be o great help.
Below is the workflow created.
Related
I created a Windows instance on AWS EC2 with T2 Micro, where I set up a schedule job that calls a .bat file at 6 every morning.
The .bat job invokes a few other scripts that mainly carry out some Internet-related transactions, including launching browsers, call services and perform I/O operations.
The issue is in most of the time the .bat file is not able to complete its job (Sometimes it does, but pretty rare). Later on, if I connect to the EC2 instance via remote desktop with the same username and manually call that .bat file, everything works fine.
Anyone has ever experienced this kind of problem and what is the resolution?
Thank you.
It's a common problem with automation. Some of the things you're doing such as "launching browsers" may not work for unattended execution.
A good example is Selenium, if you want to run web tests unattended then you need the headless version of Selenium, here's how to set it up for Headless:
Running Selenium with Headless Chrome Webdriver
My company currently applies PostgreSQL 10 and windows server 2008 OS.
I need to run a C wrote calculation program in .exe file each month.
However, it is not perfect to double click and run it every month. Furthermore, I would like to be able to run it at anytime where most of the resources are free (like mid-night). So I would like to ask if any of the following would be possible?
Setup a job in pgAgent to auto-run .exe file each month?
And is there a way to get returned info from the running results?
Thanks for anyone who gives any clue.
Windows Task Scheduler would be better suited for this task. You can select your .exe, set a run date/time and frequency. If you provide a user/password, it can run the task even if you are not logged in. See here for a tutorial.
I have a cron job
* * * * * /home/username/start.sh that runs every minutes
start.sh contents:
touch /home/username/test.txt
firefox
The cron job changes the timestamp of test.txt but is unable to open firefox. I have tried setting up env variables, but it doesn't seem to work.
You need to point to the absolute path of firefox, which you can find using which firefox as a normal user. The value could for example be /usr/bin/firefox.
Also, firefox is a GUI program, but cron jobs run in the background, and have no idea about X, so you can't start a new Firefox client in this way. For example, consider if you have two desktop logins to the same machine, via the network and locally. Where should Firefox show up when run from cron? It can't show up in both places without a more complex setup such as rdesktop. You can run it on a given display if you add that to the environment, like this (untested):
export DISPLAY=:0.0
/usr/bin/firefox
But Firefox will protest after running it the first time that it's already running, so this is only going to work if you close the window every minute.
What are you trying to accomplish?
If you are trying to check that a web server is running, you can use a shell tool like wget or curl (one of which is very likely installed already) to prod it. If you want to do testing (and you do if you want to develop good software), have a look into frameworks like Selenium and nodeunit.
I have a CSV that my computer downloads every 15 minutes automatically. I then want to automatically upload this CSV to my Google Docs account using their API.
I figure I can write a simple VBScript that pulls the CSV file from it's location and POSTs to the Google Docs API but my question is how do I set the script to run every 15 minutes in the Windows 7 environment.
Thanks for your help!
Simple: the Windows task scheduler. Link
EDIT: Eh, probably a poor link. This is more specific. You can also do it from the command line with the at command.
The problem with the script that it has poor monitor service. If you will write a windows service it can be resumed and logged automatically.
Before I start, another post for something similar to this request for help is located at Running a process at the Windows 7 Welcome Screen, but the responses were not quite what I believe I am looking for, and the post is over a year old so I thought it best to start a new thread for my needs.
In Windows 7 Ultimate, I am trying to create a script or task scheduler event that will run a Windows "rundll32.exe" process with arguments at the logon, lock, and switch user screens (basically any screen that is waiting for user to log into the machine).
I have tried using the startup script controls in group policy editor as well as creating a task scheduler event, but so far I am unable to get the process to display on the logon screens.
The command line I am using does work while logged into any account at any user level via the "Run.." dialog as well as via CMD prompt, and is only creating a popup that already exists in the Windows OEM Environment.
The hardest part is this: My friend just bought a new laptop. The new laptop came with this specific feature already enabled, but I have no idea what is making it happen and do not have access to the computer to check out gpedit.msc and task scheduler for possible solutions.
There are two reasons why I need this info: 1) I want the feature to work on my own laptop, and 2) my friend would like help disabling it on his as he doesn't like it.
I have been all over Google, posted at Microsoft Answers, and also posted on the laptop manufacturer's user forums. I have found very few pages that refer to the same question as I have, but none have answers that work, and since I have seen and know that this is possible, I am compelled to continue looking.
The laptop that this is currently working on was purchased with a fresh install of Win 7 Ultimate and no manufacturer bloatware/additional software added, so we know that the feature was made to happen by whomever it was that installed the OS and configured it for sale. Therefore I am certain it is just a matter of the right task or script in Windows itself before I see the results I need and then know how to direct my friend to disable his via phone.
The specific call is "rundll32.exe van.dll,RunVAN". In task scheduler I have set this to run as "SYSTEM" and set the triggers for startup, workstation lock, and local disconnect. I have tried using full path to rundll32.exe as well as the bare command. In gpedit startup scripts I have tried full path and bare command. Neither of which for either case is making this popup show on the logon screens.
Any and all help and/or advice on this would be greatly appreciated by both myself and my friend.
dynamic display of images for the credential provider