HI THERE...
i need a script to schedule wingftp server online and offline everyday.
i need server to be online at 11pm till 7am.
can anyone help me how to set that up pls ?
Thanks !!
NEED A DAILY SCHEDULER SCRIPT... HELP PLS
-
- Posts: 23
- Joined: Sat Oct 08, 2005 2:25 am
- Contact:
-
- Site Admin
- Posts: 2072
- Joined: Tue Sep 29, 2009 6:09 am
Re: NEED A DAILY SCHEDULER SCRIPT... HELP PLS
Here is the script:
Code: Select all
local nowHour = tonumber(os.date("%H"))
if nowHour == 23 then
c_StartDomain("YourDomainName")
end
if nowHour == 7 then
c_StopDomain("YourDomainName")
end
-
- Posts: 23
- Joined: Sat Oct 08, 2005 2:25 am
- Contact:
Re: NEED A DAILY SCHEDULER SCRIPT... HELP PLS
ok thanks man :)
pls verify if im doing it well ....
TYPE: ONCE DAY
Start DATE as TODAYS date..
Start TIME as CURRENT time..
Common API - paste your script there
Thanks again
pls verify if im doing it well ....
TYPE: ONCE DAY
Start DATE as TODAYS date..
Start TIME as CURRENT time..
Common API - paste your script there
Thanks again
-
- Site Admin
- Posts: 2072
- Joined: Tue Sep 29, 2009 6:09 am
Re: NEED A DAILY SCHEDULER SCRIPT... HELP PLS
TYPE: ONCE HOUR
-
- Posts: 23
- Joined: Sat Oct 08, 2005 2:25 am
- Contact:
Re: NEED A DAILY SCHEDULER SCRIPT... HELP PLS
why once hour?
once day means once everyday right ?
correct me if im wrong...
Thanks
once day means once everyday right ?
correct me if im wrong...
Thanks
-
- Site Admin
- Posts: 2072
- Joined: Tue Sep 29, 2009 6:09 am
Re: NEED A DAILY SCHEDULER SCRIPT... HELP PLS
Please check out the script, this script will be triggered 2 times everyday.
-
- Posts: 23
- Joined: Sat Oct 08, 2005 2:25 am
- Contact:
Re: NEED A DAILY SCHEDULER SCRIPT... HELP PLS
i can't get it to work :(
at 23 it did not turn on and at 7 it did not shutdown.
This is my script:
local nowHour = tonumber(os.date("%H"))
if nowHour == 23 then
c_StartDomain("supreme")
end
if nowHour == 7 then
c_StopDomain("supreme")
end
at 23 it did not turn on and at 7 it did not shutdown.
This is my script:
local nowHour = tonumber(os.date("%H"))
if nowHour == 23 then
c_StartDomain("supreme")
end
if nowHour == 7 then
c_StopDomain("supreme")
end
-
- Site Admin
- Posts: 2072
- Joined: Tue Sep 29, 2009 6:09 am
Re: NEED A DAILY SCHEDULER SCRIPT... HELP PLS
I have already tested it, no problem.
![Image](http://i39.tinypic.com/acg2er.png)
![Image](http://i39.tinypic.com/acg2er.png)
-
- Posts: 23
- Joined: Sat Oct 08, 2005 2:25 am
- Contact:
Re: NEED A DAILY SCHEDULER SCRIPT... HELP PLS
my pc is not set in 24hr format...should that make any difference?
Thanks
Thanks
-
- Site Admin
- Posts: 2072
- Joined: Tue Sep 29, 2009 6:09 am
Re: NEED A DAILY SCHEDULER SCRIPT... HELP PLS
You can check it through "Administration -> Console", just execute the following script:
Code: Select all
print(tonumber(os.date("%H")))