Run a php file using URL in crontab.


 
Thread Tools Search this Thread
Operating Systems Linux Run a php file using URL in crontab.
# 1  
Old 02-10-2013
Run a php file using URL in crontab.

I want to run a php file from a url using cron tab.
I am using a webhosting and i give a command like that
9 11 9 2 * wget -O /dev/null here-is-domain-name/cronfile.php
but it does not work please tell me why this not work.
I think this command must run a "cronfile.php" and i do not want to recive any email from cron.
# 2  
Old 02-11-2013
Write a wrapper script to set up your environment, or dot your profile first.
# 3  
Old 04-11-2013
try:
curl -s here-is-domain-name/cronfile.php >/dev/null
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script run in a case statement call to run a php file, also Perl

Linux System having all Perl, Python, PHP (and Ruby) installed From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file eg eg a Shell script run in a case statement call to run a php file, also Perl or/and Python file??? Like #!/usr/bin/bash .... .... case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies

2. Shell Programming and Scripting

Can't get my crontab to run

I'm trying to get a crontab to run, every Friday at 11am and the problem is that it isn't running at all. 0 11 * * 6 /Users/martinb/Documents/SYSADMIN/Regular-Scripts/Info-And-Backups.sh Here's a link to a screenshot of my script (I've censored my email address). Screen Shot 2017 11 03... (3 Replies)
Discussion started by: $shell_Learner
3 Replies

3. Shell Programming and Scripting

Log file is not updating when I run shell scripts scheduled thru crontab

Hi Forum, Good Day! I have created an empty html file wtih permissoin 777 created shell script(with permission 777) , code is below. #=======================start============== . /data09/oracle/apps_st/appl/D_oraapp095.env rm -rf /home/mnp/Test_log.txt echo... (1 Reply)
Discussion started by: kartheekbk
1 Replies

4. Shell Programming and Scripting

Reading URL using Mechanize and dump all the contents of the URL to a file

Hello, Am very new to perl , please help me here !! I need help in reading a URL from command line using PERL:: Mechanize and needs all the contents from the URL to get into a file. below is the script which i have written so far , #!/usr/bin/perl use LWP::UserAgent; use... (2 Replies)
Discussion started by: scott_cog
2 Replies

5. Shell Programming and Scripting

Script fails to run properly when run from CRONTAB

Hello all, I'm trying to write a script to gather and send data and it works just fine at the bash command line, but when executing from CRON, it does not run properly. My scripting skills are pretty limited and there's probably a better way, but as I said it works at the command line, but... (12 Replies)
Discussion started by: rusman
12 Replies

6. Solaris

crontab to run every 20 second

Hi experts, I want to set the crontab for my script which will run every 20 seconds I think below could be the possible one- */3 * * * * /export/home/username/scripts/runing.sh As my system(SOLARIS 9) is live- i am confused to implement before make sure !!! I need... (4 Replies)
Discussion started by: thepurple
4 Replies

7. UNIX for Dummies Questions & Answers

Trying to run java file in crontab

Hi. I have a java program that create reports, and I would like to run it at each hour using crontab. The main file is crome.jar located at /WebApps/Crome folder. When I want to execute the program I use the next script (name crome): #!/bin/sh if ; then ... (1 Reply)
Discussion started by: karmariv
1 Replies

8. Shell Programming and Scripting

Run perl file in Crontab error.

Hi. I can run the script okay when I log in with root. Then I add this script to crontab and when crontab run i got this message error. I has installed DBD for Oracle already. I set ORACLE_HOME, ORACLE_BASE to root profile already. Please help me to fix it. It urgent. Thank so much. ... (2 Replies)
Discussion started by: raccsdl
2 Replies

9. UNIX for Dummies Questions & Answers

cron job to run php file

Hello, I have searched and searched google to do this and i want my websever to be able to run a php file everyday automatically. How do I go about doing this? Php is installed as an apache module not CGI. Thank you! (3 Replies)
Discussion started by: christo16
3 Replies

10. Shell Programming and Scripting

Need to execute a complete url from crontab

Hi, I need to execute a URL through crontab. Please could you help me to. I need something like 15 0 * * * http://www.mysite.com/index.php. Is it possible. If not, how can I execute a script from another server.. Any help will be appritiatable. Many thanks, Nissar.P.K (2 Replies)
Discussion started by: nissar
2 Replies
Login or Register to Ask a Question