Setting Up a Cron Job in Plesk - Part 2

Monday, December 17th, 2007

My cron jobs have been running as scheduled, but the strange part is I have been getting status emails…with errors in them.

I am using the cron jobs (Scheduled Tasks) in Plesk to run my sitemap generators. Every time the generator runs, it deletes the old generated files and creates new ones. I was wondering why I was getting errors. Sometimes, the files wouldn’t generate at all.

I called tech support at my new wonderful hosting company. Melissa explained to me that I set up the cron jobs under the user account for that domain. When the jobs are run via web interface online, they are running under the user. When they are run by cron, they are running under a different username, without the same privileges. The cron run is not able to delete those existing files and write new ones.

The way I got around this in was to click on “” (over in the left column) and then “Scheduled Tasks.” Once in the scheduled tasks manager, I clicked on “” to set up the scheduled tasks under that user.

I am running the sitemap right now through the …wait…it just finished with no errors and the files were updated correctly. I did not receive a status email because I set the email address up while the was running. I am running a different site right now and will let you know how it goes.

By the way, is very good.

Related posts