scheduling an "at job"  from a web page

Posted on 2003-03-31
Medium Priority
Last Modified: 2010-03-05
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];

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:)

Question by:manad
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

Accepted Solution

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.

Expert Comment

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.

Author Comment

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!

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