Alex G
Alex G

Reputation: 2309

Multiple cron jobs using wget

I am using Ubuntu server, and I want to do a wget cron job for just about every day of the week for different files.

I have gotten this to work for only one task, but anytime I try to do more it automatically overwrites the old one. I know how to set up times, and the format, etc; but I do not know how to do multiple wget cron jobs.

This is how I've been doing only one so far:

 echo "*/10 * * * 5 wget http://XXX.XXX.XXX/files/thursday.php" | crontab -

Can anyone help me? Thanks

Upvotes: 0

Views: 783

Answers (1)

user557846
user557846

Reputation:

best to use the command line crontab function for maintaing cron jobs

crontab -e 

will bring up the editor.

The default on most *nix system is vi, which is not newbie friendly, but you can change it to nano or pico with

export EDITOR=nano

and if your on a system like mine, your logged in user may not be the best user to run cron jobs as; so you may may have to use su to switch users before editing the crontab file.

looking at what you are specify doing, unless you really need to go through appache, you can just call the php file like so "php file.php" no wget needed.

*/10 * * * 5 php FULL_PATH/files/thursday.php  > /dev/null 2>&1

Upvotes: 1

Related Questions