General :: Run A Program For A Specific Amount Of Time Starting At A Specific Time?
May 18, 2010
I want to record an internet radio station starting at 2:00am tomorrow morning. The specific program on the radio station lasts until 6:00am. The command I need to run to record the station is: Code:mplayer http://wjcu.jcu.edu:8001/listen.pls -ao pcm:file=indie_heat_of_the_night.wav -vc dummy -vo nullI'd use cron, but 1. I'm not sure how to and 2. it seems unnecessarily complicated for something that I only want to run once. If cron is the only/easiest solution, I guess I'll just have to resort to that, but I'd rather not.
i wanted to know how can I make my programs or script automatically start at boot time ,for example if I restart my server at any time they start at boot time automatically with no need to any body to start them.
So at work I usually forget to shut down my computer at the end of the day 5:30 and they switch the breaker off at 6pm which cant be good way to shut down a computer. So i was doing some googling and this is what i come up with.
this is the example i found online Code: #crontab -e -u root Code: 0 20 * * * /sbin/shutdown -h now since the above turns it down at 8pm i need to edit it to 5 30pm
Code: 0 17:30 * * * /sbin/shutdown -h now would this be correct?
Can anyone shed some light in this? Using Fedora 14-64, new install, 185 Opteron x 2 gig ram, sata hard drives formatted Ext4.However, in my home directory I have a folder for all my digital photos of which I have more than 20,000, and in another folder I have images and clipart of which I have almost 8,000. That is a lot of read only access to a significant number of files in my home directory.
How can I tell Fedora to not update the LAST ACCESS TIME of those files (specifically images) that will never actually be changed other than just being read. I want to leave that feature enabled for the rest of my home directory. I am trying t; improve my disk performance in Nautilus because whenever I access the folders with my images the system literally slows to a crawl and sometimes even the mouse stops working for several minutes until Nautilus has finished having its heart attack.
I am using openSUSE 11.2 and had the same issue once before in openSUSE 11.1 After some time, two domains I use very often can't be accessed any more, these are: Google and [URL]... (am doing some OO development recently). At the time where I write this post, only these two are "blocked".
When I try to access these two domains using Firefox, w3m or telnet, it tries to open the connection forever. Ping works fine. I tried opening the IP directly in the browser, but same problem, the connection never reaches. I know it's not a router issue, as the other computers can access these domains. Still, I tried to restart the router, but the issue persists. I tried restarting the network service (/etc/init.d/network stop + start), also nscd, without success. The only way I found to make it work again is to reboot. This problem reappears from time to time, after using the computer for a long time, and accessing these domains a lot of times. Note that I also use suspend to disk, so the "blocked" state is kept after resume. Only reboot "cures" it.
How do you find a file modified March 17, 2010, between 3:30 pm and 4:05 pm? I know that I must be missing something somewhere.How do you search for info like this? I goggled "search files time Linux" and got about 38,300,000 results. I looked through the first four pages and did not see what I was looking for.Do I need to calculate how many minutes ago that is and give that to find.I really want to do this in the GUI so that I can operate on the files found without typing in so much stuff.
How to refresh a page automatically?Say for example i need to refresh page in ubuntuforums to get new questions.I feel lazy to refresh the page often.Is it possible to refresh the page automatically in a specific time interval?I have tried ReloadEvery Firefox Add-on.But it refresh all the tabs.What i want is i want to refresh a page in a particular TAB.
I'm running Ubuntu 10.10 in a computer with a 7200rpm HD, 8Gb Ram, and a Core i7, and the time it takes to load the desktop is insane. There are threads that mention the problem of gnome looking for nonexistent floppy drives and to solve the problem by disabling that in the BIOS (option I don't have). Anyway, besides that problem, by running at startup a gnome-terminal with the iotop command, I noticed that two processes have a huge i/o load on the system: google desktop and ubuntu one. I would like those programs to run as part of the startup process, but be launched after several seconds (to allow the rest of the programs to load). Is there any way I can achieve this? I think there should be a way modifying the commands under startup application, but I cannot find anything that works.
I'm looking to find a way to schedule my computer to wake up at say 7:00am. Every night before I go to bed, I put my computer into suspend so the fan doesn't wake me (old computer). I can't seem to find a task scheduler that allows me to be able to wake the system.
How do I get vlc to start at a specific time in a media file. I can do it easily in mplayer2, mpv but not vlc. Let's say the media file is named abc.avi (file format,container not important for this example.) Also the running time is around 2+ hrs. In mplayer2 and mpv I can simply do :-
I have looked high and low for this, but to no avail. I am looking for a script to shutdown my computer when it reaches a specific time (say 10:00). I know about the shutdown command but if I use that I cannot shutdown my computer manually. I would like to be able to shutdown manually AND automatically.
I've been quite puzzled by the behavior of unattended updates - it seems it runs the updates at or before 7am (on all the server installs I've got). They are only set to do security updates unattended, but what I am wondering is if there is a way to change the time that they install? I want the updates to install early in the morning, at like 3am or such, so I can reboot the machine when I get up if needs a reboot.I found a few mentions about it, but nothing specifically talking about the time.[URL]..
I've just put together a 10.04 server using a GA-D525TUD atom board. I've installed gnome desktop too. I'm trying to get 4 sata drives to go into standby, but hdparm seems to be ignoring the settings. If i issue hdparm -y /dev/sdx the drive duly goes into standby and stays in standby until accessed. I've put entries in rc.local along with the hdparm.conf settings, but still no joy.
I am trying to extract just a few files/folders from a Time Machine backup, but can't seem to find them. The drive is automatically mounted in Ubuntu, and am able to access after enabling view hidden files, the HFS+ Private Data Directory. But that is a jumbled array of thousands of numbered folders, with each taking a fair amount of time to open on this aging Dell running 10.10.
I've tried running the standard Places - Search for Documents, with 'Show hidden and backup files' enabled, but that won't pull up any of the search times I'm going for (and seemingly won't find anything at all on the drive). So, is there any way to decipher the directory tree so as to be able to access this data from Ubuntu? Or perhaps a file embedded somewhere in there that lists out the original structure, so that I can use it as an index to see what number correlates to what originally named folder?
When I leave my computer and later return, depending on how long I've been away, I find the screen-saver running, the screen turned off, or the computer suspended, i get the error as specified below on a black screen:
Ubuntu is running in low-graphics mode.
Your screen, graphics card, and input device settings could not be detected correctly. You will need to configure these yourself.
The message gives several options. Despite some experimentals, The only solution which I have found is to reboot and everything becomes fine as before.
Is there a way to set Linux to automatically log in to a specific user account and at the same time lock the screen? I want to save time and trigger various software that always should start up on boot, while leaving the computer unattended during startup (extra important and practical for remote control boots), by enforcing a 'screen lock' so that no-one can see what happens behind the login screen without entering the login credentials.
I'm just wondering what the limits for time are. I have a program that always takes exactly 20 ms, so I assume this is the lowest it can measure, but I want to see if there's some sort of documentation of this.
So right now VNC is starting a session using :1. When I connect to that session, the terminal is logged in as root. I'd like for the terminal to be logged in as a different user as some of my end users are going to be using this and don't require such privileges. I found that I can "su" to a different user and start a new VNC daemon on :2 and when I connect to that session, the terminal is logged in as that user. What I want to do is get that to run at boot-up.
I deleted some files on the command line and would like to learn if it's possible to recover them. It's not a terrible thing if they are gone, but I want to see what I can do. The server is configured as a hardware RAID5+1 (ext3, Debian Stable) and I *really* don't want to take a dd of the entire disk.
ls -id gets me the inode value of the directory(155655)
I'd like to create a disk image starting at that specific inode. Then there is the issue of picking an outer boundary of the disk image. I'm hoping there's a dd/ext3 genius out there to advise.
Im writing a script that extracts part of the path name:I drop a file in terminal and set the directory name of the file to x using dirname $0note: ( directory is different every time since not all files are from the same location)
ex. x="/home/Downloads/yesterday/photo/.../image.png" /image.png /.../ means I dont know the name of folders between but I know the path name always starts
Possibly related to this previous question, I would like to be able to run a task for a specified amount of time, then stop/kill it, then start it again. Specifically, I run the Folding@Home application on my Linux workstation. Periodically, it will have trouble logging-in to the home server, and will sit idle for a long time, but not release memory/resources it has claimed (yes, I realize this is likely a bug in the tool, but I can't fix that currently). Typically just the act of killing and starting the tool will allow it to check-in again. So, I would like to be able to run something like:
run_for <time> ./fah6
Does such a tool exist, or should I write a wrapper than nukes the fah6 client after, say, a week and restart it?
I'm trying to find how to schedule a process to start at a specific time (not on start up). How would I schedule a process/application to start at a specific time (if it matters, it will be a background process). For instance, have process abc start every weekday at 5am. I've done this for windows many times though have only been using linux regularly for a few months and haven't figured out the best way of doing this.
So far the best solution I have is to create a program that will start on boot and have it check the time and sleep until the required time and then start the required process(es) at the required time(s). But this seems more of a hack since I'd expect there to be a proper way of doing this.
A function by name abc is called in many files. I want to copy all the lines with the function call to an output file.A simple grep on function name doesn't help me as the function call is spanning across multiple lines as follows:
abc(parameter1, parameter2, parameter3);
So I want to copy all the three lines (till semicolon) to the output file.The problem is because there are more than 200 calls for the same function and I cannot do it manually
Is it possible to prevent a specific program (i.e. rhythmbox and its dependencies) from ever swapping to disk?I'm asking because I have a problem when a music player hiccups whenever Chromium hogs too much memory. Is there a way to work around this? This isn't a problem in Windows anymore so presumably there is a way.
I've been given one of these ubiquitous usb-sleep buttons which is basically a supersimple usb-keyboard. It's a big button that sends a SLEEP keypress to the computer when you slam it. But that is pretty boring. I'd love to remap it to do something more fun but I can't figure out how to bind to only the sleep press from the button and not from my ordinary keyboard.
The button identifies as
Bus 001 Device 035: ID 1130:600d Tenx Technology, Inc.
I'd like to know if there's either
a way of mapping a key from a specific keyboard to an action OR a way of remapping the sleep key from a specific keyboard to a new key-code or something like that.