?
Solved

Using cron / crontab / wget with no popups

Posted on 2010-04-09
7
Medium Priority
?
582 Views
Last Modified: 2013-12-13
Hello, I'm using Windows XP SP3

I have a web server w/ PHP & I installed something called pycron

This is a Windows version of cron

When I run either:
php c:\www\file.php
wget http://localhost/file.php

I get a CMD / BAT popup depending on the type of file I scheduled with pycron.

How can I stop this? I have tasks scheduled every minute and the popups are extremely annoying. I need to run the cronjob php file but I don't want any notice at all.
0
Comment
Question by:imagine7xy
  • 4
  • 3
7 Comments
 
LVL 16

Accepted Solution

by:
HackneyCab earned 1500 total points
ID: 30252257
You could try using the start command with the /B flag:

http://www.computerhope.com/starthlp.htm
0
 

Author Comment

by:imagine7xy
ID: 30252357
Hackney, I tried  that however a window still popups up for like a millisecond, which can get really annoying after awhile.
0
 
LVL 16

Assisted Solution

by:HackneyCab
HackneyCab earned 1500 total points
ID: 30253347
So Windows pops up a window, then checks the flags and realises its error?

See, this is why I use Linux for serious work, and Windows only for gaming.

Have you tried using the /MIN flag too? Maybe that would stop it being so visible while Windows sorted itself out.
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 

Author Comment

by:imagine7xy
ID: 30253526
Actually, what I think happens is the .bat turns into a .cmd when it is ran, because start /B is only for batch right? So I run wget or php-win via and it opens up a cmd.
0
 
LVL 16

Expert Comment

by:HackneyCab
ID: 30254887
According to Microsoft's own docs, start is for any command, not just batch.

I've no idea why it's not behaving as Microsoft's own docs specify. (Like I said, it's that sort of frustration that drove me to FreeBSD and Linux.)
0
 

Author Comment

by:imagine7xy
ID: 30265153
I found a solution to this problem, you use php-win.exe, which generates no cmd.exe

If you use pycron, make sure you specify only php-win.exe as command, and -f "C:\pathtoscript.php" as parameter.
0
 

Author Closing Comment

by:imagine7xy
ID: 31760925
Great idea and hes right, I should use a unix like OS
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

599 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