Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Win32::Taskscheduler failed to install on win7

by mkhan (Sexton)
on Jul 26, 2011 at 05:23 UTC ( #916671=perlquestion: print w/replies, xml ) Need Help??

mkhan has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,
I am trying to install the Win32::Taskscheduler module from CPAN on my Win7_x64 machine.
It fails while trying to do a dmake with the following error:
dmake: Error code 129, while making 'TaskScheduler.o'

I tried installing it using ActivePerl on Win7_x64 and also tried installing it on Win2008_x32 using Strawberry Perl.

My questions:
1. How do I resolve this?
2. Is there any other simple way to schedule your script execution on a windows machine?

Any help would be appreciated.

ERROR CODE:

Checking if your kit is complete... Looks good Note (probably harmless): No library found for -lmstask Note (probably harmless): No library found for -lmsvcrt Note (probably harmless): No library found for -lmoldname Note (probably harmless): No library found for -lkernel32 Note (probably harmless): No library found for -luser32 Note (probably harmless): No library found for -lgdi32 Note (probably harmless): No library found for -lwinspool Note (probably harmless): No library found for -lcomdlg32 Note (probably harmless): No library found for -ladvapi32 Note (probably harmless): No library found for -lshell32 Note (probably harmless): No library found for -lole32 Note (probably harmless): No library found for -loleaut32 Note (probably harmless): No library found for -lnetapi32 Note (probably harmless): No library found for -luuid Note (probably harmless): No library found for -lwsock32 Note (probably harmless): No library found for -lmpr Note (probably harmless): No library found for -lwinmm Note (probably harmless): No library found for -lversion Note (probably harmless): No library found for -lodbc32 Writing Makefile for Win32::TaskScheduler cp Example.pl blib\lib\Win32\Example.pl cp runTime.pl blib\lib\Win32\runTime.pl cp TaskScheduler.pm blib\lib\Win32\TaskScheduler.pm cp trigger.pl blib\lib\Win32\trigger.pl C:\Perl64\bin\perl.exe C:\Perl64\lib\ExtUtils\xsubpp -typemap C:\Perl +64\lib\Ext Utils\typemap TaskScheduler.xs > TaskScheduler.xsc && C:\Perl64\bin\p +erl.exe -M ExtUtils::Command -e "mv" -- TaskScheduler.xsc TaskScheduler.c Please specify prototyping behavior for TaskScheduler.xs (see perlxs m +anual) gcc -c -O2 -DWIN32 -DPERL_IMPLICIT_CONTEXT -DPERL_MSVCRT_READ +FIX -O2 -DVERSION=\"2.0.3\" -DXS_VERSION=\"2.0.3\" -DHASATTRIBUTE "-IC:\Pe +rl64\lib\C ORE" -TP TaskScheduler.c In file included from TaskScheduler.h:16, from TaskScheduler.xs:5: TConvert.h:37: error: expected '=', ',', ';', 'asm' or '__attribute__' + before '_ tochar' TConvert.h:84: error: expected '=', ',', ';', 'asm' or '__attribute__' + before '_ towchar' TConvert.h:131: error: expected '=', ',', ';', 'asm' or '__attribute__ +' before ' _totchar' TConvert.h:186: error: expected '=', ',', ';', 'asm' or '__attribute__ +' before ' _cochar' TConvert.h:229: error: expected '=', ',', ';', 'asm' or '__attribute__ +' before ' _cowchar' TConvert.h:272: error: expected '=', ',', ';', 'asm' or '__attribute__ +' before ' _cotchar' In file included from TaskScheduler.h:17, from TaskScheduler.xs:5: misc.h: In function 'IntFromHash': misc.h:11: warning: return makes integer from pointer without a cast misc.h:19: warning: return makes integer from pointer without a cast misc.h: In function 'IVFromHash': misc.h:27: warning: return makes integer from pointer without a cast misc.h:35: warning: return makes integer from pointer without a cast misc.h: In function 'IntToHash': misc.h:64: warning: return makes integer from pointer without a cast misc.h:73: warning: return makes integer from pointer without a cast misc.h: In function 'IVToHash': misc.h:81: warning: return makes integer from pointer without a cast misc.h:90: warning: return makes integer from pointer without a cast TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_New': TaskScheduler.xs:35: error: incompatible type for argument 1 of 'CoCre +ateInstanc e' c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.4.5/../../../../x86_64- +w64-mingw3 2/include/objbase.h:238: note: expected 'const struct IID * const' but + argument is of type 'CLSID' TaskScheduler.xs:35: error: incompatible type for argument 4 of 'CoCre +ateInstanc e' c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.4.5/../../../../x86_64- +w64-mingw3 2/include/objbase.h:238: note: expected 'const struct IID * const' but + argument is of type 'GUID' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_End': TaskScheduler.xs:67: error: 'ITask' has no member named 'Release' TaskScheduler.xs:68: error: 'ITaskScheduler' has no member named 'Rele +ase' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_Enum': TaskScheduler.xs:94: error: 'ITaskScheduler' has no member named 'Enum +' TaskScheduler.xs:102: error: 'IEnumWorkItems' has no member named 'Nex +t' TaskScheduler.xs:109: warning: initialization makes pointer from integ +er without a cast TaskScheduler.xs:116: error: 'IEnumWorkItems' has no member named 'Rel +ease' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_Activate': TaskScheduler.xs:134: error: 'ITask' has no member named 'Release' TaskScheduler.xs:138: warning: assignment makes pointer from integer w +ithout a c ast TaskScheduler.xs:139: error: 'ITaskScheduler' has no member named 'Act +ivate' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_SetTargetComput +er': TaskScheduler.xs:175: warning: assignment makes pointer from integer w +ithout a c ast TaskScheduler.xs:177: error: 'ITaskScheduler' has no member named 'Set +TargetComp uter' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_GetAccountInfor +mation': TaskScheduler.xs:210: error: 'ITask' has no member named 'GetAccountIn +formation' TaskScheduler.xs:213: warning: initialization makes pointer from integ +er without a cast TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_SetAccountInfor +mation': TaskScheduler.xs:244: error: 'ITask' has no member named 'SetAccountIn +formation' TaskScheduler.xs:248: warning: assignment makes pointer from integer w +ithout a c ast TaskScheduler.xs:249: warning: assignment makes pointer from integer w +ithout a c ast TaskScheduler.xs:250: error: 'ITask' has no member named 'SetAccountIn +formation' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_Save': TaskScheduler.xs:283: error: 'ITask' has no member named 'QueryInterfa +ce' TaskScheduler.xs:287: error: 'IPersistFile' has no member named 'Save' TaskScheduler.xs:295: error: 'IPersistFile' has no member named 'Relea +se' TaskScheduler.xs:300: error: 'ITask' has no member named 'Release' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_GetApplicationN +ame': TaskScheduler.xs:322: error: 'ITask' has no member named 'GetApplicati +onName' TaskScheduler.xs:326: warning: initialization makes pointer from integ +er without a cast TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_SetApplicationN +ame': TaskScheduler.xs:346: warning: assignment makes pointer from integer w +ithout a c ast TaskScheduler.xs:359: error: 'ITask' has no member named 'SetApplicati +onName' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_GetParameters': TaskScheduler.xs:386: error: 'ITask' has no member named 'GetParameter +s' TaskScheduler.xs:389: warning: initialization makes pointer from integ +er without a cast TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_SetParameters': TaskScheduler.xs:413: warning: assignment makes pointer from integer w +ithout a c ast TaskScheduler.xs:415: error: 'ITask' has no member named 'SetParameter +s' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_GetWorkingDirec +tory': TaskScheduler.xs:441: error: 'ITask' has no member named 'GetWorkingDi +rectory' TaskScheduler.xs:444: warning: initialization makes pointer from integ +er without a cast TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_SetWorkingDirec +tory': TaskScheduler.xs:468: warning: assignment makes pointer from integer w +ithout a c ast TaskScheduler.xs:470: error: 'ITask' has no member named 'SetWorkingDi +rectory' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_Delete': TaskScheduler.xs:496: warning: assignment makes pointer from integer w +ithout a c ast TaskScheduler.xs:497: error: 'ITaskScheduler' has no member named 'Del +ete' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_GetPriority': TaskScheduler.xs:522: error: 'ITask' has no member named 'GetPriority' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_SetPriority': TaskScheduler.xs:548: error: 'ITask' has no member named 'SetPriority' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_NewWorkItem': TaskScheduler.xs:591: warning: assignment makes pointer from integer w +ithout a c ast TaskScheduler.xs:593: error: 'ITask' has no member named 'Release' TaskScheduler.xs:597: error: 'ITaskScheduler' has no member named 'New +WorkItem' TaskScheduler.xs:616: error: 'ITask' has no member named 'CreateTrigge +r' TaskScheduler.xs:705: error: 'ITaskTrigger' has no member named 'SetTr +igger' TaskScheduler.xs:714: error: 'ITaskTrigger' has no member named 'Relea +se' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_GetTriggerCount +': TaskScheduler.xs:746: error: 'ITask' has no member named 'GetTriggerCo +unt' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_GetTriggerStrin +g': TaskScheduler.xs:772: error: 'ITask' has no member named 'GetTriggerSt +ring' TaskScheduler.xs:778: warning: initialization makes pointer from integ +er without a cast TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_DeleteTrigger': TaskScheduler.xs:802: error: 'ITask' has no member named 'DeleteTrigge +r' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_GetTrigger': TaskScheduler.xs:836: error: 'ITask' has no member named 'GetTrigger' TaskScheduler.xs:842: error: 'ITaskTrigger' has no member named 'GetTr +igger' TaskScheduler.xs:843: error: 'ITaskTrigger' has no member named 'Relea +se' TaskScheduler.xs:872: error: 'ITaskTrigger' has no member named 'Relea +se' TaskScheduler.xs:882: error: 'ITaskTrigger' has no member named 'Relea +se' TaskScheduler.xs:892: error: 'ITaskTrigger' has no member named 'Relea +se' TaskScheduler.xs:903: error: 'ITaskTrigger' has no member named 'Relea +se' TaskScheduler.xs:912: error: 'ITaskTrigger' has no member named 'Relea +se' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_SetTrigger': TaskScheduler.xs:940: error: 'ITask' has no member named 'GetTrigger' TaskScheduler.xs:1009: error: 'ITaskTrigger' has no member named 'SetT +rigger' TaskScheduler.xs:1015: error: 'ITaskTrigger' has no member named 'Rele +ase' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_CreateTrigger': TaskScheduler.xs:1044: error: 'ITask' has no member named 'CreateTrigg +er' TaskScheduler.xs:1114: error: 'ITaskTrigger' has no member named 'SetT +rigger' TaskScheduler.xs:1120: error: 'ITaskTrigger' has no member named 'Rele +ase' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_SetFlags': TaskScheduler.xs:1143: error: 'ITask' has no member named 'SetFlags' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_GetFlags': TaskScheduler.xs:1167: error: 'ITask' has no member named 'GetFlags' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_GetExitCode': TaskScheduler.xs:1191: error: 'ITask' has no member named 'GetExitCode +' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_GetStatus': TaskScheduler.xs:1217: error: 'ITask' has no member named 'GetStatus' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_GetNextRunTime' +: TaskScheduler.xs:1244: error: 'ITask' has no member named 'GetNextRunT +ime' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_Run': TaskScheduler.xs:1272: error: 'ITask' has no member named 'Run' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_Terminate': TaskScheduler.xs:1295: error: 'ITask' has no member named 'Terminate' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_SetComment': TaskScheduler.xs:1319: warning: assignment makes pointer from integer +without a cast TaskScheduler.xs:1320: error: 'ITask' has no member named 'SetComment' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_GetComment': TaskScheduler.xs:1350: error: 'ITask' has no member named 'GetComment' TaskScheduler.xs:1353: warning: initialization makes pointer from inte +ger withou t a cast TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_GetMaxRunTime': TaskScheduler.xs:1379: error: 'ITask' has no member named 'GetMaxRunTi +me' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_SetMaxRunTime': TaskScheduler.xs:1410: error: 'ITask' has no member named 'SetMaxRunTi +me' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_SetCreator': TaskScheduler.xs:1435: warning: assignment makes pointer from integer +without a cast TaskScheduler.xs:1436: error: 'ITask' has no member named 'SetCreator' TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_GetCreator': TaskScheduler.xs:1466: error: 'ITask' has no member named 'GetCreator' TaskScheduler.xs:1469: warning: initialization makes pointer from inte +ger withou t a cast TaskScheduler.xs: In function 'XS_Win32__TaskScheduler_GetMostRecentRu +nTime': TaskScheduler.xs:1496: error: 'ITask' has no member named 'GetMostRece +ntRunTime' dmake: Error code 129, while making 'TaskScheduler.o' UNICOLET/Win32-TaskScheduler2.0.3.zip dmake -- NOT OK CPAN: YAML::XS loaded ok (v0.35) Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible

Thanks,

Replies are listed 'Best First'.
Re: Win32::Taskscheduler failed to install on win7
by syphilis (Archbishop) on Jul 26, 2011 at 07:28 UTC
    dmake: Error code 129, while making 'TaskScheduler.o'

    There's not much we can tell from that - show us the *entire* dmake output. (We need to see the earlier error messages.)

    Cheers,
    Rob
      Here it is:



      Also updating the original post.
        TConvert.h:37: error: expected '=', ',', ';', 'asm' or '__attribute__' ....

        This usually indicates that you need to compile with 'g++' instead of 'gcc'. Therefore try:
        dmake realclean perl Makefile.PL CC=g++ dmake test
        But don't get too hopeful ... I've just tried that myself and it looks like there could be some other issues to sort out.

        Cheers,
        Rob
Re: Win32::Taskscheduler failed to install on win7
by BrowserUk (Patriarch) on Jul 26, 2011 at 13:38 UTC
    Is there any other simple way to schedule your script execution on a windows machine?

    Have you look at:

    >SCHTASKS /? SCHTASKS /parameter [arguments] Description: Enables an administrator to create, delete, query, change, run and end scheduled tasks on a local or remote system. Parameter List: /Create Creates a new scheduled task. /Delete Deletes the scheduled task(s). /Query Displays all scheduled tasks. /Change Changes the properties of scheduled task. /Run Runs the scheduled task immediately. /End Stops the currently running scheduled task. /? Displays this help message.

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      The problem with both "AT" and "SCHTASKS" seems to be that they can only schedule Windows EXE or batch files to run and not Perl files.

      Can someone verify if this is true.
      Also, I gave up on CRONW with the number of dependencies it has. It is a pain to install.

        I would guess that they only schedule elements whose extension is listed in $ENV{PATHEXT}.

        It's not hard to create an "universal" Perl launcher:

        @echo off setlocal perl -w "%~dpn0.pl" %*

        Put this file as a .cmd right where your Perl script is:

        Directory of Q:\ 27.07.2011 10:18 50 tmp.cmd 27.07.2011 09:01 962 tmp.pl

        ... and you can run your Perl script without changing the extension.

        So far I haven't tested whether shell redirection works with this approach, so you still might need to modify PATHEXT for that.

        Update: I forgot to mention Schedule::Cron, which does duty as a cron replacement since about 8 years or so on Windows for me.

        can only schedule ... batch files ... not Perl files

        So wrap the perl file in a batch file. Is it too complicated? How about two lines (and one's a comment! :)

        rem yourapp.bat \path\to\your\perl.exe \path\to\yourapp.pl %*

        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        can only schedule Windows EXE or batch files to run and not Perl files.

        pl2bat makes perl files into batchfiles in a jiffy

        IIRC, I don't believe this is the case, like everything, it depends on ftype/assoc and pathext/path -- it is basically like double-clicking a file

Re: Win32::Taskscheduler failed to install on win7
by cjb (Friar) on Jul 26, 2011 at 07:44 UTC
    Win32::Taskscheduler is for manipulating the Windows Task Scheduler from perl. If you just need to schedule the execution of your script you just need to add it to Scheduled Tasks. Easier way to do this is via the GUI. Something along the lines of Start->Settings->Control Panel->Scheduled tasks->Add Scheduled Tasks (on windows XP at least) and then follow the wizard.
Re: Win32::Taskscheduler failed to install on win7
by ww (Archbishop) on Jul 26, 2011 at 13:16 UTC
    Suggested recently by planetscape, IIRC, and in another context, but possibly useful (interesting, at the very least):
    CronW

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://916671]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2022-12-04 12:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?