?
Solved

scheduling an "at job"  from a web page

Posted on 2003-03-31
3
Medium Priority
?
141 Views
Last Modified: 2010-03-05
Hi,
I need to schedule an "at job" from a webpage.
The www user is added in the file at.allow

The following two lines in my perl script are supposed to do the trick

$mycmd = "at -f /home/scripts/jobs/uptime_rpt -t ".@store[2].@store[1].@store[4].@store[5];
system($mycmd);

I have printed out $mycmd and it looks okay to me.

When I checked the apache error log, I found a message

job 1049142180.a at Mon March 31 14.47.00 2003
i dont know what is wrong with this? Infact the values and everything matches what is entered by the web user.

However I am sure the job is not scheduled because when i use ps to list the processes I do not find the uptime_rpt script running.  

Please let me know whats wrong if you know..Thanks a lot:)



0
Comment
Question by:manad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Accepted Solution

by:
EarleAke earned 400 total points
ID: 8248060
It may have run and have errored off.  Might check the email for the username www.  Does the username www have a shell associated with it?  If not, the at job can not run.  Try to "su - www" then see if you can run the job manually and see what happens.
0
 

Expert Comment

by:jptillman
ID: 8250778
Try doing this instead of the system() call:

my $response = `$mycmd`;
print "<pre>" . $response . "</pre>";

This ought to show you what the "at" call responded with.
0
 

Author Comment

by:manad
ID: 8251025
hey thanks:) thast exactly what happened. the script was running but errored out. so now i have fixed the script and everything works well!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question