I want to run my JMETER test scenarios everyday at 12 PM, any suggestion ?
You can use linux Cron task or windows equivalent.
You could also do it from jmeter by using scheduler but it's a kind of tweak.
You can use Jenkins it is pretty cool stuff and designed for such task only.
Related
I have a Cucumber test (feature files) in the RubyMine IDE and lately I have a need to execute one of the feature repeatedly on a scheduled time.
I haven't found a way to do so. Any idea or thoughts on scheduling that feature file?
You can create a cron job which will execute a rake.
The software utility Cron is a time-based job scheduler in Unix-like
computer operating systems. People who set up and maintain software
environments use cron to schedule jobs (commands or shell scripts) to
run periodically at fixed times, dates, or intervals.
These links might help
How to create a cron job using Bash
how to create a cron job to run a ruby script?
http://rake.rubyforge.org/
I solved the problem by simply installing Jenkins on my machine from its official site,https://jenkins-ci.org/. I configured master and slave nodes on my own machine because I just needed to run one feature file(it has the script I want to run on daily basis).
Although, it is recommended to configure slave on a different machine if we have multiple jobs to run and our jobs are resource intensive.
There is a very good illustration on installing, configuring and running jobs in this link http://yakiloo.com/setup-jenkins-and-windows/
I have a java package,
I want to my program be runned every night at 0 o'clock automaticlly,
how can I do this work?
Generally you have 2 solutions:
Create application that runs your code every night, i.e. implement scheduling yourself. Obviously you can (and should) use tools that help you to do scheduling.
Use OS-specific tools. For example cron for unix and windows task scheduler for windows.
You can either schedule in your own OS. On *nix, there is cron. I'm not sure what is used in windows.
Or you can make your own java program schedule: on running it, it sets a times to execute your task in a specific time.
You could use a Thread.sleep() counting the time from now until midnight, but that's a poor-man's solution. Quartz is your man, as it works schedulling your tasks.
If you choose the schedulling path, you can't forget to run your application in the OS startup
I have a script running on windows box that downloads files from the net via http. I want it to download only from 1am - 8am (my ISP's off peak time). I am happy if already started download finishes after 8am but what is the best method to make sure that the script starts downloading after 1am? I want to run the script and go to sleep. I want to use ruby only.
Is sleep the best way how to do it?
There is a good article on this here: Scheduling tasks in Ruby / Rails
But as someone else mentioned, you should use the windows task scheduler to start your script. Unless you really want to start it manually at 1am and every time you reboot your windows box... See this other SO question on how to add a scheduled task using the AT DOS command: What is the Windows version of cron?
i wanna to create a cron job on windows that daily delete files from a specific folder.
how can i do this??
Thanks in advance
Use Schedule tasks in windows. Check here. You can use del command to remove one or more files. Put it inside a batch script and schedule it as a task.
You want Scheduled Tasks.
With Scheduled Tasks, you can schedule
any script, program, or document to
run at a time that is most convenient
for you. Scheduled Tasks starts every
time that you start Windows XP and
runs in the background, and it starts
each task that you schedule at the
time that you specify when you create
the task.
Edit your question if you specifically need help with the deleting files bit, but typing in help del at a command prompt should tell you everything you need to know.
I use Cron for Windows, it's very easy to use if you are familiar with cron from *nix
I just setup cron on my windows dev system in order to perform
an hourly run of a script.
I tried to edit crontab in order to run my script hourly, sadly
with no success.
Could anyone pls. drop me the crontab line which will execute
script.xy every hour?
If you're using Windows, why not use the built-in Scheduled Tasks (Accessories-System Tools)?
It may not show up immediately in the Wizard, but it is possible to set up tasks to be run hourly. Just add a daily task and then tick the "Open Advanced Properties" checkbox. Then go to the Schedule tab and again click "Advanced".
I figured it out: 0 * * * * C:\doSomeWork.script Makes the script run every full hour. Sometimes the easy way is the best... ;) thx anyway
I'd argue you probably don't want to be using Cron on Windows at all. Instead use a Scheduled Task (accessible through the Control Panel) and select your script.
Alternatively create a Windows service which runs your program hourly. I've never heard of people using Cron for Windows tasks in this way.
Can't you use the Windows Task Scheduler instead of crontab?
A commandline solution would look something like:
at 00:00 /EVERY:M,T,W,Th,F,S,Su yourScript.cmd
at 01:00 /EVERY:M,T,W,Th,F,S,Su yourScript.cmd
...
Notice that you have to schedule a new task for each hour.
Anyone got a better soluition for this using the at command?