faqts : Computers : Programming : Languages : Perl

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 10 people (10%) answered Yes
Recently 1 of 10 people (10%) answered Yes

Entry

How to make an external call work when scheduling a PERL script through "Scheduled Tasks" on WIN2k?

Oct 23rd, 2003 05:40
Colin Thomsen, Ryan,


External calls (I presume you mean system or backticks calls) should
work for scheduled tasks if you ensure the following:
- You provide the right user/password to run the scheduled task.
Unfortunately when you test scheduled tasks by running them manually,
they don't use this username/password, so it is harder to test this. For
domain users, the username should be DOMAIN\username
- You provide the full path for the external call. For example, you
could run a program in c:\stuff using system("c:\stuff\program.exe");
- Remember that scheduled tasks can run while you are not logged on, so
if the external command is on a mapped drive eg. H:, it may not be
accessible. You can avoid this problem by using the network path
directly eg. \\homeserver\
- You don't try to run a command which requires a GUI or user input
- Provide any environment variables in your script that the external
command requires