Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Cron Job/Crontab
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Cron Job/Crontab
Cron Job/Crontab
05-10-2012 12:18 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi,
I have uploaded some php scripts to my CCGI webspace and I want to run a couple of cron jobs once a day. I see cron access seems to be removed due to security risks but I thought you could ask via the question system for a cron job to be installed. I guess I wasn't clear enough when I asked a question as there was an if in the statment and I was told that once the service is running correctly the support section can't do much more.
Anyway, I wish to run 2 cron jobs once a day. I have poscron.sh which contains:
#!/bin/sh
# $Id: poscron.sh 81 2010-08-12 02:49:35Z frozenice2525 $
#cd ~/your_path_to_tracker
/usr/local/bin/php5 cron_updatepos.php
I'm not sure if I should be asking for cron to run the .sh files or just the .php files and .sh is for when you have command prompt access. If I have to run the .sh files they are:
poscron.sh
postrackercron.sh
or the .php files the above files run are:
cron_updatepos.php
cron_updateallianceinfo.php
cron_updatesov.php
So the code could be:
0 3 * * * ./poscron.sh >> /logs/poscron.log
0 3 * * * ./postrackercron.sh >> /logs/postrackercron.log
or
0 3 * * * ./cron_updatepos.php >> /logs/poscron.log
0 3 * * * ./cron_updateallianceinfo.php >> /logs/postrackercron.log
0 3 * * * ./cron_updatesov.php >> /logs/postrackercron.log
I guess that you can ask for cron to be setup but I have to say run X not if this or that. Does anyone have experience with running this type of thing and can assist?
I have uploaded some php scripts to my CCGI webspace and I want to run a couple of cron jobs once a day. I see cron access seems to be removed due to security risks but I thought you could ask via the question system for a cron job to be installed. I guess I wasn't clear enough when I asked a question as there was an if in the statment and I was told that once the service is running correctly the support section can't do much more.
Anyway, I wish to run 2 cron jobs once a day. I have poscron.sh which contains:
#!/bin/sh
# $Id: poscron.sh 81 2010-08-12 02:49:35Z frozenice2525 $
#cd ~/your_path_to_tracker
/usr/local/bin/php5 cron_updatepos.php
I'm not sure if I should be asking for cron to run the .sh files or just the .php files and .sh is for when you have command prompt access. If I have to run the .sh files they are:
poscron.sh
postrackercron.sh
or the .php files the above files run are:
cron_updatepos.php
cron_updateallianceinfo.php
cron_updatesov.php
So the code could be:
0 3 * * * ./poscron.sh >> /logs/poscron.log
0 3 * * * ./postrackercron.sh >> /logs/postrackercron.log
or
0 3 * * * ./cron_updatepos.php >> /logs/poscron.log
0 3 * * * ./cron_updateallianceinfo.php >> /logs/postrackercron.log
0 3 * * * ./cron_updatesov.php >> /logs/postrackercron.log
I guess that you can ask for cron to be setup but I have to say run X not if this or that. Does anyone have experience with running this type of thing and can assist?
Message 1 of 5
(5,070 Views)
4 REPLIES 4
Re: Cron Job/Crontab
05-10-2012 12:06 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I am now using the path:
0 3 * * * /usr/local/php5/bin /share/storage/04/th/thompson73/cron_updatesov.php >> /logs/cron.log
would this path be correct? I suppose I could forget about the log pipe if that causes issues.
0 3 * * * /usr/local/php5/bin /share/storage/04/th/thompson73/cron_updatesov.php >> /logs/cron.log
would this path be correct? I suppose I could forget about the log pipe if that causes issues.
Message 2 of 5
(611 Views)
Re: Cron Job/Crontab
06-10-2012 5:30 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
In theory, I think you'd need
0 3 * * * /full/path/to/your/script.cgi >> /full/path/to/your/logfile.log 2>&1
but I'm not sure if PN will actually add new crontab files for users of ccgi.
Do you have space on PAYH? You can set your own cron jobs on there.
Gabe
0 3 * * * /full/path/to/your/script.cgi >> /full/path/to/your/logfile.log 2>&1
but I'm not sure if PN will actually add new crontab files for users of ccgi.
Do you have space on PAYH? You can set your own cron jobs on there.
Gabe
Message 3 of 5
(611 Views)
Re: Cron Job/Crontab
06-10-2012 10:21 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I have the Extra service. I don't live in a fibre area so it's just standard ADSL. There is also no .cgi file to run for the cron. I had access on another hosting service with cpanel and I was able to setup and test the cron jobs. I'm at a loss really. I'm finding it hard to find any hard evidence on setting up cron with plusnet so the only conclusion I can reach is that it cannot be done.
Is the PAYH service an extra you would need to fund? - I see it is an extra, so I guess if you want the usage of cron you have to add the PAYH service. I don't have it for business purposes, just something I want to do for fun. I'll just have to live without it I suppose.
Thanks for posting.
Is the PAYH service an extra you would need to fund? - I see it is an extra, so I guess if you want the usage of cron you have to add the PAYH service. I don't have it for business purposes, just something I want to do for fun. I'll just have to live without it I suppose.
Thanks for posting.
Message 4 of 5
(611 Views)
Re: Cron Job/Crontab
08-10-2012 1:56 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Unfortunately we had to turn SSH access to the CGI platform off some time ago.
If you raise a ticket via the portal we can set up cron jobs for you.
If you raise a ticket via the portal we can set up cron jobs for you.
Message 5 of 5
(611 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page