Find the answer to your Linux question:
Results 1 to 10 of 10
Hi all, I have made a vb6 porgram, it is running without any error in windows platform. However, i want it to be run at Fedora too. I run my ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2009
    Posts
    9

    Scheduler/VB6 program running in Fedora


    Hi all,

    I have made a vb6 porgram, it is running without any error in windows platform. However, i want it to be run at Fedora too. I run my program with Wine Windows Program Loader in a Linux pc, but the program stuck with an error message:

    Run-time error '429':
    ActiveX component can't create object

    I thought it was the error message because of missing some dll/reference files, so I tried to copy all those related .dll & .ocx file into my wine file. (Just copy and paste into the system32 of wine, no regsvr32 statement to register the .dll as what we always do in Windows.) However, all my efforts are in vain. I not sure what is the cause of this error. Anybody can give me a hint on this issue?

    p/s: My purpose to run the vb6 program in linux is because I want to make a scheduler in linux pc so that this program can be run once per day automatically and send email. Any suggestion on how to achieve this also are welcome. I am lost... Many many thanks!

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    VB is a windows programming environment for writing programs that run on windows, not linux. Wine is not foolproof, not everything works and things that do work might not work in their entirety. Why would you need a windows application to schedule in a linux PC when you can use a native application (cron) that is the defacto standard?

  3. #3
    Just Joined!
    Join Date
    Nov 2009
    Posts
    9
    This was just my piece of idea, because I am totally new to Linux and i used to use this vb6 program to run a schedule task in my windows PC.

    Ok, I'll take a look in cron to see how it is running.

    My purpose to make a schedule task in linux is so that I can check the condition from database once per day, and send email to those person-in-charge. Can cron achive this solution?

  4. #4
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    Cron is simply a scheduler, you can have it run anything you want to for the most part. You can tell it to run an application or script that does what you want.

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,159
    You should be able to create a shell script easily enough to do what you want, and then use cron to schedule it to run as you wish. In any case, you'd have to run a VB application in the Wine environment and it does not do well for many applications. I would certainly never use VB to run applications in Linux. In fact, I prefer never to use VB at all given its many limitations and Windows-centric orientation.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #6
    Just Joined!
    Join Date
    Nov 2009
    Posts
    9
    I created a simple "Hello Perl" script and just for testing purpose to see whether the cron works.

    When i type ps aux | grep crond, I get this:
    root 2145 0.0 0.1 5260 788 ? Ss Nov16 0:00 crond
    admin 11098 0.0 0.1 4216 712 pts/0 S+ 09:58 0:00 grep crond
    root 27812 0.0 0.2 5260 1220 ? Ss Nov17 0:00 crond

    Then, I type : 01 * * * * perl /etc/perl/testing.pl
    it returns: bash: 01: command not found

    What is my problem?
    If I run the script with perl etc/perl/testing.pl, it works with HELLO PERL printing.

  7. #7
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,159
    Try using the full path for perl in the crontab, usually /usr/bin/perl.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  8. #8
    Just Joined!
    Join Date
    Nov 2009
    Posts
    9
    Ok, now I have edit my crontab file to be :

    Code:
    SHELL=/bin/bash
    PATH=/sbin:/bin:/usr/sbin:/usr/bin
    #MAILTO=root
    HOME=/
    
    # run-parts
    */5 * * * * root /usr/bin/perl /etc/test.pl
    Which the test.pl insert the date time NOW() into the database table. I want it to be run every 5 minutes so that I can see an immediate result.

    Unfortunately, my cron job execute with an imperfection. That is, every 5 minutes, it insert the record twice.

    checkdate
    2009-11-18 16:45:01
    2009-11-18 16:45:01
    2009-11-18 16:50:05
    2009-11-18 16:50:05
    2009-11-18 16:55:02
    2009-11-18 16:55:02

    But if i run my perl script seperately, it works fine with only one record inserted.

  9. #9
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,159
    My guess is that you have 2 cron jobs scheduled.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  10. #10
    Just Joined!
    Join Date
    Nov 2009
    Posts
    9
    I think so...
    Ok i'll continue to trace it, thanks everyone!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •