Tag Info

Hot answers tagged

7

My guess would be that whatever shell your at job is using is different to the one that you use at the command line, and the at job shell doesn't have a kill built-in that knows about symbolic signal symbols. This is common on Ubuntu, which uses dash for /bin/sh (which is used by at by default) but /bin/bash for interactive shells. You can use the 'kill' ...


6

at -c jobnumber will list a single job. If you want to see all of them, you might create a script like #!/bin/bash MAXJOB=$(atq | head -n1 | awk '{ print $1; }') for each in $(seq 1 $MAXJOB); do echo "JOB $each"; at -c $each; done Probably there's a shorter way to do that, I just popped that out of my head :)


5

Netsend messages have been removed from Windows 7. One way I have found to do this without installing 3rd party software is to leverage the remote shutdown commands: shutdown -m //computername -r -f -c "MESSAGE" -t 120 shutdown -m //computername -a The first command pops a message up, and will begin the shutdown in 120 seconds, the second command will ...


3

by vbscript: dim WMIObj, strHost, intProcessID on error resume next strHost = "remotehost.domain.com" set WMIObj = GetObject("winmgmts:\\" & strHost & "\root\cimv2:Win32_Process") if IsObject(WMIObj) then WMIObj.Create "cmd.exe /C msg * ""ha-ha-ha""", null, null, intProcessID end if set WMIObj = nothing


3

Try this: $ echo "curl -k https://localhost/projekt/crons/purge/5 > projekt.log 2>&1" | at now + 5 minutes


3

If you just enter at without any parameters, it will show scheduled tasks. Also, normally you should get a hint "Added a new job with job ID = x".


2

You can normalize the dates using something like: date -d "$date" --rfc-3339=seconds I was going to suggest the following, but at seems to ignore locale environment variables: LC_TIME=C at -v ... # has no effect


2

I can see that the strings differ in the date/time format. You can split the output into two substrings (job 4 at), and the date/time part. Then, you can parse the date using the function strtotime. At the end, you can combine the first part with the parsed date/time. So, you get a uniform ouput. Also, you can convert the date/time part to the desired ...


2

I'm getting CMD.EXE and NOTEPAD.EXE to start fine w/ the /INTERACTIVE switch on Windows Server 2003 Standard 32-bit Service Pack 2. I suspect you're connected to a non-console session with Terminal Services. The programs started by Scheduled Tasks from an AT w/ the /INTERACTIVE switch will show up in session 0, which is visible only on the console (or a ...


2

For CentOS and related the environment variable SHELL is read when the at command is issued and this is used as the shell to execute the commands or if it is unset then the user's login shell is used. It looks like Ubuntu ignores this although it does warn you - warning: commands will be executed using /bin/sh. Can you not just write your commands in a file ...


2

This should be doable with the msg. Something like msg <username> /SERVER:<servername> <message


2

The following command works with XP and 7 initiated from 2003 server: at \\remotecomputer time /interactive msg remoteuser /SERVER:remotecomputer This is the message The remotecomputer is the computer where the message should appear and the remoteuser is the user logged into the remote computer (user who should see the message). To clear all at commands ...


2

When you invoke the at command it copies the current environment so that's what you're seeing. The working directory, the environment (except for the variables TERM, DISPLAY and _) and the umask are retained from the time of invocation. You are running at in a php script via apache so what you are seeing in the script is the environment etc that ...


2

It's working, I looked in the /usr/local/zenoss/Products/ZenUtils/Utils.py file to find that Zenoss sends the message text to stdin so I only needed to read stdin in the expect script to get the message. Here is the new working script: (note that I left out host & port parameters) #!/usr/bin/expect # - VAR set ctrlz \032 set xt \135 set timeout 15 set ...


2

The problem appears to be that from my understanding Zenoss sends the actual message to the scripts STDIN input, but your script expects it as a command line parameter. You have to modify your expect script in a way that it will read the message from STDIN instead of $argv 3. After that, your test script should work like this: echo "Message" | ./sms.sh ...


1

You can't use a parameter in the AT command to do this for a single command. You could create a crazy amount of them to suffice (say 24 to have it run every hour every day). My advice is to stop using AT and use the schtasks command that replaces it. http://support.microsoft.com/kb/814596 It will let you create a cmd line task that will do what you are ...


1

The problem is similar to that of cron : your job execute in a minimal environment (think PATH=/bin:/usr/bin and 2 or 3 things) and with nothing attached to its standard input and outputs. First make sure your Apache account as a working shell (and not /bin/false), because 'at' will use this shell to run your jobspec. Then try this more specific snippet : ...


1

Did you check to see if the apache user is in the at.allow file? Per the man page... The /etc/at.allow and /etc/at.deny files determine which user can sub- mit commands for later execution via at(1) or batch(1). The format of the files is a list of usernames, one on each line. Whitespace is not permitted. The superuser may always ...


1

Is it possible that atd is not running? ps -ef|grep atd This is a bit of a long shot because you would get a warning from the at command if the daemon were not running.


1

Review the scheduler log at c:\WINDOWS\SchedLgU.Txt You should find the entry after you job. It will say something like this, but probably have a non zero exit code: Result: The task completed with an exit code of (0). Did you try invoking this command interactively before scheduling it? I suspect your problem is that wmplayer is not in the system path. ...


1

It turns out that dash likes signals in the form -CONT and doesn't understand the -SIGCONT style. Since bash understands both, it may be more portable to use the former. In my testing, it didn't make any difference whether I included an explicit path to 'kill' but the way the signal is specified did.



Only top voted, non community-wiki answers of a minimum length are eligible